Move amdgpu stuff to module.
This commit is contained in:
parent
b97d67044d
commit
68c3f36e2b
@ -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
15
modules/nixos/amdgpu.nix
Normal 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"];
|
||||
};
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user