Install nh and friends, modularize nixos conf.

This commit is contained in:
CronyAkatsuki 2025-01-29 21:26:50 +01:00
parent ea86d38cd1
commit 5054b13564
14 changed files with 302 additions and 209 deletions

27
modules/nixos/nvidia.nix Normal file
View file

@ -0,0 +1,27 @@
{
lib,
config,
...
}: {
# Allow for nvidia
options = {
crony.nvidia.enable = lib.mkEnableOption "enable nvidia";
};
config = lib.mkIf config.crony.nvidia.enable {
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia.open = false;
hardware.nvidia.modesetting.enable = true;
hardware.nvidia.powerManagement.enable = true;
hardware.nvidia.nvidiaSettings = true;
hardware.nvidia.prime = {
offload = {
enableOffloadCmd = true;
enable = true;
};
nvidiaBusId = "PCI:1:0:0";
amdgpuBusId = "PCI:5:0:0";
};
};
}