File tree Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 9
9
./disk.nix
10
10
./keyboard.nix
11
11
./firmware.nix
12
- ./graphics.nix
12
+ ./graphics
13
13
./networking
14
14
./system.nix
15
15
./virtualisation.nix
Original file line number Diff line number Diff line change
1
+ { lib , config , ...} :
2
+ let
3
+ cfg = config . facter . detected . graphics . amd ;
4
+ in
5
+ {
6
+ options . facter . detected . graphics = {
7
+ amd . enable = lib . mkEnableOption "Enable the AMD Graphics module" // {
8
+ default = builtins . elem "amdgpu" ( builtins . map ( graphics_card : graphics_card . driver ) config . facter . report . hardware . graphics_card ) ;
9
+ } ;
10
+ } ;
11
+ config = lib . mkIf cfg . enable {
12
+ services . xserver . videoDrivers = [ "amdgpu" ] ;
13
+ } ;
14
+ }
Original file line number Diff line number Diff line change 1
1
{ lib , config , ... } :
2
2
let
3
- facterLib = import ../../lib/lib.nix lib ;
3
+ facterLib = import ../../../ lib/lib.nix lib ;
4
4
cfg = config . facter . detected . graphics ;
5
5
in
6
6
{
7
+ imports = [
8
+ ./amd.nix
9
+ ] ;
7
10
options . facter . detected = {
8
11
graphics . enable = lib . mkEnableOption "Enable the Graphics module" // {
9
12
default = builtins . length ( config . facter . report . hardware . monitor or [ ] ) > 0 ;
You can’t perform that action at this time.
0 commit comments