Change starship prompt, update inputs, add nvidia module

This commit is contained in:
DashieTM 2024-08-19 20:52:00 +02:00
parent bd5a2e3ec5
commit 7730cbef59
9 changed files with 93 additions and 25 deletions

View file

@ -1,6 +1,14 @@
{ lib, config, options, pkgs, ... }: {
options.mods = {
nvidia.enable = lib.mkOption {
default = false;
type = lib.types.bool;
example = true;
description = ''
Enables nvidia support.
'';
};
amdgpu.enable = lib.mkOption {
default = false;
type = lib.types.bool;
@ -40,6 +48,7 @@
"amdgpu.ppfeaturemask=0xffffffff"
];
};
hardware = {
graphics =
let
@ -60,5 +69,15 @@
(lib.lists.optionals config.mods.vapi.rocm.enable rocm_packages);
};
};
});
} // lib.optionalAttrs (options?hardware.graphics) (lib.mkIf config.mods.nvidia.enable {
hardware.nvidia = {
modesetting.enable = true;
# powerManagement.enable = false;
# powerManagement.finegrained = true;
open = true;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
services.xserver.videoDrivers = [ "nvidia" ];
}));
}