Modularize hardware config and remove specific nix folder
This commit is contained in:
parent
a5042bb645
commit
9ac5b25036
72 changed files with 322 additions and 100 deletions
20
modules/programs/bluetooth.nix
Normal file
20
modules/programs/bluetooth.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ lib, config, options, ... }: {
|
||||
options.mods = {
|
||||
bluetooth.enable = lib.mkOption {
|
||||
default = false;
|
||||
type = lib.types.bool;
|
||||
example = true;
|
||||
description = ''
|
||||
Enables bluetooth.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.bluetooth.enable (lib.optionalAttrs (options?hardware.bluetooth) {
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue