diff options
Diffstat (limited to 'host/athena.nix')
-rw-r--r-- | host/athena.nix | 78 |
1 files changed, 58 insertions, 20 deletions
diff --git a/host/athena.nix b/host/athena.nix index c37318f..6a7d266 100644 --- a/host/athena.nix +++ b/host/athena.nix @@ -4,6 +4,7 @@ imports = [ ./hardware/athena.nix ./software/desktop + ./software/desktop/xterm.nix ]; boot = { @@ -12,12 +13,13 @@ efi.canTouchEfiVariables = true; }; - initrd.luks.devices = [ { - name = "encrypted"; - device = "/dev/nvme0n1p2"; - preLVM = true; - allowDiscards = true; - } ]; + initrd.luks.devices = { + encrypted = { + device = "/dev/nvme0n1p2"; + preLVM = true; + allowDiscards = true; + }; + }; }; networking = { @@ -51,7 +53,7 @@ acpid.enable = true; xserver = { - videoDrivers = [ "intel" ]; + videoDrivers = [ "nvidia" ]; synaptics = { enable = true; @@ -61,9 +63,49 @@ minSpeed = "1.5"; }; }; + + printing = { + enable = true; + drivers = [ pkgs.hplip ]; + }; + + avahi = { + enable = true; + nssmdns = true; + }; + }; + + hardware.nvidia = { + package = pkgs.linuxPackages.nvidia_x11; + prime = { + offload.enable = true; + + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + powerManagement.enable = true; }; - virtualisation.libvirtd.enable = true; + environment.systemPackages = [ + pkgs.zenith-nvidia + pkgs.virt-manager + (pkgs.writeScriptBin "nvidia-offload" '' + export __NV_PRIME_RENDER_OFFLOAD=1 + export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 + export __GLX_VENDOR_LIBRARY_NAME=nvidia + export __VK_LAYER_NV_optimus=NVIDIA_only + exec -a "$0" "$@" + '') + ]; + + virtualisation = { + libvirtd.enable = true; + docker = { + enable = true; + enableNvidia = true; + }; + }; + users.users.common.extraGroups = [ "docker" ]; hardware.trackpoint = { enable = true; @@ -73,22 +115,18 @@ hardware.bluetooth.enable = true; - hardware.opengl.extraPackages = [ pkgs.intel-ocl ]; - services.tlp = { enable = true; - extraConfig = '' - RESTORE_DEVICE_STATE_ON_STARTUP=1 - DEVICES_TO_DISABLE_ON_STARTUP="wwan" - ''; + settings = { + RESTORE_DEVICE_STATE_ON_STARTUP = 1; + START_CHARGE_THRESH_BAT0 = 75; + STOP_CHARGE_THRESH_BAT0 = 85; + CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; + ENERGY_PERF_POLICY_ON_BAT = "powersave"; + }; }; powerManagement.powertop.enable = true; - i18n = { - consoleFont = "ter-132n"; - consolePackages = [ pkgs.terminus_font ]; - }; - - boot.earlyVconsoleSetup = true; + system.stateVersion = "21.11"; } |