refactor: import nixosModules unconditionally, add enable options
This commit is contained in:
parent
c2d4ce78de
commit
850d673035
38 changed files with 959 additions and 761 deletions
|
|
@ -1,15 +1,24 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
boot.kernelModules = [ "amdgpu" ];
|
||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.my.amdGraphics.enable = lib.mkEnableOption "AMD graphics drivers";
|
||||
|
||||
hardware = {
|
||||
graphics.enable = true;
|
||||
amdgpu = {
|
||||
opencl.enable = true;
|
||||
overdrive.enable = true;
|
||||
config = lib.mkIf config.my.amdGraphics.enable {
|
||||
boot.kernelModules = [ "amdgpu" ];
|
||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
|
||||
hardware = {
|
||||
graphics.enable = true;
|
||||
amdgpu = {
|
||||
opencl.enable = true;
|
||||
overdrive.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [ nvtopPackages.amd ];
|
||||
environment.systemPackages = with pkgs; [ nvtopPackages.amd ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue