options/profiles: add laptop profile
This commit is contained in:
parent
99b6b41de3
commit
7906864ae1
2 changed files with 19 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
|||
imports = [
|
||||
./desktop.nix
|
||||
./gaming.nix
|
||||
./laptop.nix
|
||||
./server.nix
|
||||
];
|
||||
}
|
||||
|
|
18
modules/options/profiles/laptop.nix
Normal file
18
modules/options/profiles/laptop.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption;
|
||||
in {
|
||||
options = {
|
||||
local.profiles.laptop.enable = mkEnableOption "the laptop profile";
|
||||
};
|
||||
|
||||
config.assertions = lib.mkIf config.local.profiles.laptop.enable [
|
||||
{
|
||||
assertion = !config.local.profiles.server.enable;
|
||||
message = "The laptop profile cannot be enabled if `local.profiles.server.enable` is set to true.";
|
||||
}
|
||||
];
|
||||
}
|
Loading…
Add table
Reference in a new issue