Add OpenGL support
This commit is contained in:
parent
79571cd59f
commit
132b48dfb3
5 changed files with 51 additions and 48 deletions
|
@ -1,19 +1,14 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
# Nix Reference Manual:
|
||||
# https://nixos.org/manual/nix/stable/
|
||||
# NixOS Packages / Options:
|
||||
# https://search.nixos.org/packages?
|
||||
|
||||
# Other things to consider:
|
||||
# Telegraf
|
||||
|
||||
{ lib, config, pkgs, ... }: {
|
||||
imports =
|
||||
[
|
||||
# Desktop Environments
|
||||
./desktops/common.nix
|
||||
./desktops/gnome.nix
|
||||
|
||||
# Software
|
||||
|
@ -91,30 +86,11 @@
|
|||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.albert = {
|
||||
isNormalUser = true;
|
||||
description = "Albert J. Copeland";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
packages = with pkgs; [
|
||||
firefox
|
||||
bitwarden
|
||||
steam
|
||||
lutris
|
||||
vlc
|
||||
vscodium
|
||||
];
|
||||
};
|
||||
|
||||
# Allow unfree packages
|
||||
|
|
40
desktops/common.nix
Normal file
40
desktops/common.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
# If a GUI is enabled, install GUI apps:
|
||||
{ lib, pkgs, config, ... }: {
|
||||
users.users.albert = {
|
||||
packages = with pkgs; [
|
||||
firefox
|
||||
bitwarden
|
||||
steam
|
||||
lutris
|
||||
vlc
|
||||
vscodium
|
||||
];
|
||||
};
|
||||
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
layout = "us";
|
||||
xkbVariant = "";
|
||||
libinput = {
|
||||
enable = true;
|
||||
touchpad.tapping = true;
|
||||
};
|
||||
|
||||
# Enable nVidia drivers
|
||||
videoDrivers = [ "nvidia" ];
|
||||
autorun = true;
|
||||
};
|
||||
|
||||
}
|
|
@ -54,7 +54,7 @@
|
|||
modules = [
|
||||
# Configuration Imports
|
||||
./hosts/${hostname}/hardware-configuration.nix # Hardware Configuration
|
||||
./hosts/${hostname}/configuration.nix # Extra options for the host hardware configuration
|
||||
./hosts/${hostname}/configuration.nix # Extra options for the host configuration
|
||||
./configuration.nix # Common NixOS Configuration
|
||||
|
||||
# Flake Imports
|
||||
|
|
|
@ -22,21 +22,23 @@
|
|||
tod.driver = pkgs.libfprint-2-tod1-vfs0090;
|
||||
};
|
||||
|
||||
# Enable nVidia PRIME Render Offload
|
||||
# Enable nVidia PRIME Render Offload and OpenGL
|
||||
# https://github.com/NixOS/nixos-hardware/blob/master/lenovo/thinkpad/p1/3th-gen/nvidia.nix
|
||||
hardware.nvidia.prime = {
|
||||
# Bus ID of the Intel GPU.
|
||||
hardware = {
|
||||
opengl.enable = true;
|
||||
opengl.driSupport32Bit = true;
|
||||
|
||||
nvidia.prime = {
|
||||
intelBusId = lib.mkDefault "PCI:0:2:0";
|
||||
# Bus ID of the NVIDIA GPU.
|
||||
nvidiaBusId = lib.mkDefault "PCI:1:0:0";
|
||||
};
|
||||
};
|
||||
|
||||
# Fingerprint software
|
||||
environment.systemPackages = with pkgs; [ fprintd ];
|
||||
|
||||
imports = [
|
||||
# Modules
|
||||
../../modules/xserver.nix
|
||||
../../modules/powertop.nix
|
||||
];
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
{ lib, config, pkgs, ... }: {
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
layout = "us";
|
||||
xkbVariant = "";
|
||||
libinput = {
|
||||
enable = true;
|
||||
touchpad.tapping = true;
|
||||
};
|
||||
# Enable nVidia drivers
|
||||
videoDrivers = [ "nvidia" ];
|
||||
autorun = true;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue