-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from numtide/graphics
add graphics module
- Loading branch information
Showing
3 changed files
with
14 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,8 @@ | ||
{ lib, config, ... }: | ||
let | ||
|
||
cfg = config.facter.boot; | ||
inherit (config.facter) report; | ||
in | ||
{ | ||
options.facter.bluetooth.enable = lib.mkEnableOption "Enable the Facter bluetooth module" // { | ||
default = | ||
let | ||
bluetooth = report.hardware.bluetooth or [ ]; | ||
in | ||
builtins.length bluetooth > 0; | ||
default = builtins.length (config.facter.report.hardware.bluetooth or []) > 0; | ||
}; | ||
|
||
config = | ||
with lib; | ||
mkIf cfg.enable { | ||
hardware.bluetooth.enable = lib.mkIf config.facter.bluetooth.enable (lib.mkDefault true); | ||
}; | ||
config.hardware.bluetooth.enable = lib.mkIf config.facter.bluetooth.enable (lib.mkDefault true); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ lib, config, ... }: | ||
{ | ||
options.facter.graphics.enable = lib.mkEnableOption "Enable the Graphics module" // { | ||
default = builtins.length (config.facter.report.hardware.monitor or []) > 0; | ||
}; | ||
|
||
config.hardware.graphics.enable = lib.mkIf config.facter.graphics.enable (lib.mkDefault true); | ||
} |