Move amdgpu stuff to module.

This commit is contained in:
CronyAkatsuki 2025-02-01 18:24:16 +01:00
parent b97d67044d
commit 68c3f36e2b
3 changed files with 17 additions and 3 deletions

View File

@ -25,9 +25,6 @@
enable32Bit = true;
};
# Try to fix amdgpu
boot.initrd.kernelModules = ["amdgpu"];
services.xserver.videoDrivers = ["amdgpu"];
# Enable networking
networking.networkmanager.enable = true;

15
modules/nixos/amdgpu.nix Normal file
View File

@ -0,0 +1,15 @@
{
config,
lib,
...
}: {
options = {
crony.amdgpu.enable = lib.mkEnableOption "Load amdgpu modules at boot.";
};
config = lib.mkIf config.crony.amdgpu.enable {
# Try to fix amdgpu
boot.initrd.kernelModules = ["amdgpu"];
services.xserver.videoDrivers = ["amdgpu"];
};
}

View File

@ -10,6 +10,7 @@
./nbfc.nix
./ryzenadj.nix
./qemu.nix
./amdgpu.nix
];
crony.bluetooth.enable = lib.mkDefault true;
@ -22,4 +23,5 @@
crony.nbfc.enable = lib.mkDefault true;
crony.ryzenadj.enable = lib.mkDefault true;
crony.qemu.enable = lib.mkDefault true;
crony.amdgpu.enable = lib.mkDefault true;
}