diff options
| author | Seth Flynn <[email protected]> | 2025-02-13 21:15:51 -0500 |
|---|---|---|
| committer | Seth Flynn <[email protected]> | 2025-02-13 22:09:11 -0500 |
| commit | 5fb078416ff2f51e4a8a672673e9f38a451ac745 (patch) | |
| tree | 4d970fb649d25b6e72ac50410a66136ac9fc4e90 /modules/nixos/custom/nvk.nix | |
| parent | c01800e6ab06bad0eb4a585c5435a90ff1563be0 (diff) | |
nixos/nvk: init
Diffstat (limited to 'modules/nixos/custom/nvk.nix')
| -rw-r--r-- | modules/nixos/custom/nvk.nix | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/modules/nixos/custom/nvk.nix b/modules/nixos/custom/nvk.nix new file mode 100644 index 0000000..2178e63 --- /dev/null +++ b/modules/nixos/custom/nvk.nix @@ -0,0 +1,34 @@ +{ config, lib, ... }: + +let + cfg = config.borealis.nvk; +in + +{ + options.borealis.nvk = { + enable = lib.mkEnableOption "an NVK specialisation"; + }; + + config = lib.mkIf cfg.enable { + specialisation = { + nvk.configuration = { + boot = { + # required for GSP firmware + kernelParams = [ "nouveau.config=NvGspRm=1" ]; + # we want early KMS + # https://wiki.archlinux.org/title/Kernel_mode_setting#Early_KMS_start + initrd.kernelModules = [ "nouveau" ]; + }; + + hardware = { + graphics.extraPackages = lib.mkForce [ ]; + nvidia-container-toolkit.enable = lib.mkForce false; + }; + + services.xserver.videoDrivers = lib.mkForce [ "modesetting" ]; + + system.nixos.tags = [ "with-nvk" ]; + }; + }; + }; +} |
