refactor: switch from modules to import arrays
This commit is contained in:
parent
d893750c09
commit
41eaa38d31
75 changed files with 1870 additions and 2541 deletions
|
|
@ -1,26 +1,16 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
feature = "amd-gpu";
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.${feature}.enable {
|
||||
# load graphics drivers before anything else
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
|
||||
# load graphics drivers before anything else
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
extraPackages = with pkgs; [ amdvlk ];
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
extraPackages = with pkgs; [ amdvlk ];
|
||||
};
|
||||
|
||||
options.${feature}.enable = lib.mkEnableOption "enables ${feature}";
|
||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue