summaryrefslogtreecommitdiff
path: root/systems
diff options
context:
space:
mode:
authorseth <[email protected]>2024-03-13 02:54:23 -0400
committerseth <[email protected]>2024-03-13 02:54:23 -0400
commiteb81eaeb91a76085102d7175685d36837887933c (patch)
tree639a85e343607c6f738b315d51513ea3cc7ca4bf /systems
parenta8fcf26187fa13e3631d211388bfc3506029d691 (diff)
nixos/nvidia: init
Diffstat (limited to 'systems')
-rw-r--r--systems/glados/default.nix5
-rw-r--r--systems/glados/gpu.nix35
2 files changed, 4 insertions, 36 deletions
diff --git a/systems/glados/default.nix b/systems/glados/default.nix
index 847940e..86cb76a 100644
--- a/systems/glados/default.nix
+++ b/systems/glados/default.nix
@@ -6,7 +6,6 @@
imports = [
./boot.nix
./hardware-configuration.nix
- ./gpu.nix
];
archetypes.personal.enable = true;
@@ -20,6 +19,10 @@
traits = {
containers.enable = true;
+ nvidia = {
+ enable = true;
+ nvk.enable = true;
+ };
tailscale.enable = true;
zram.enable = true;
};
diff --git a/systems/glados/gpu.nix b/systems/glados/gpu.nix
deleted file mode 100644
index 8e494c7..0000000
--- a/systems/glados/gpu.nix
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- config,
- lib,
- pkgs,
- ...
-}: let
- usingNvidia = lib.elem "nvidia" config.services.xserver.videoDrivers;
-in {
- boot.kernelParams = lib.optional usingNvidia "nvidia_drm.fbdev=1";
-
- services.xserver.videoDrivers = ["nvidia"];
-
- hardware = {
- opengl.extraPackages = [pkgs.vaapiVdpau];
- nvidia = {
- package = config.boot.kernelPackages.nvidiaPackages.latest;
- modesetting.enable = true;
- };
- };
-
- specialisation = {
- nvk.configuration = {
- boot = {
- kernelParams = ["nouveau.config=NvGspRm=1"];
- initrd.kernelModules = ["nouveau"];
- };
-
- hardware.opengl.extraPackages = lib.mkForce [];
-
- services.xserver.videoDrivers = lib.mkForce ["modesetting"];
-
- system.nixos.tags = ["with-nvk"];
- };
- };
-}