options/profiles: add laptop profile

This commit is contained in:
Anthony Rodriguez 2025-01-14 12:21:49 +01:00
parent 99b6b41de3
commit 7906864ae1
Signed by: nezia
GPG key ID: EE3BE97C040A86CE
2 changed files with 19 additions and 0 deletions

View file

@ -2,6 +2,7 @@
imports = [
./desktop.nix
./gaming.nix
./laptop.nix
./server.nix
];
}

View 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.";
}
];
}