Added working example
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
# Push the configuration into the Flake's module pool
|
||||
flake.nixosModules.bluetooth = { config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.mySystem.system.power-management;
|
||||
in {
|
||||
# 1. Define the custom toggle
|
||||
options.mySystem.system.power-management.enable = lib.mkEnableOption "Power Management/Profiles";
|
||||
|
||||
# 2. Apply the configuration
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.upower.enable = true;
|
||||
services.power-profiles-daemon.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user