File tree Expand file tree Collapse file tree 3 files changed +22
-2
lines changed Expand file tree Collapse file tree 3 files changed +22
-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
+ facterLib = import ../../../lib/lib.nix lib ;
4
+ cfg = config . facter . detected . graphics . amd ;
5
+ in
6
+ {
7
+ options . facter . detected . graphics = {
8
+ amd . enable = lib . mkEnableOption "Enable the AMD Graphics module" // {
9
+ default = builtins . elem "amdgpu" (
10
+ facterLib . collectDrivers ( config . facter . report . hardware . graphics_card or [ ] )
11
+ ) ;
12
+ } ;
13
+ } ;
14
+ config = lib . mkIf cfg . enable {
15
+ services . xserver . videoDrivers = [ "amdgpu" ] ;
16
+ } ;
17
+ }
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