feat: wip module for hosts roles
This commit is contained in:
parent
97f2fd94e6
commit
32e4b957aa
33
modules/nixos/roles/default.nix
Normal file
33
modules/nixos/roles/default.nix
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
inherit (lib)
|
||||||
|
mkIf
|
||||||
|
mkMerge
|
||||||
|
mkOption
|
||||||
|
types
|
||||||
|
;
|
||||||
|
role = config.ataraxia.defaults.role;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.ataraxia.defaults = {
|
||||||
|
role = mkOption {
|
||||||
|
type = types.enum [
|
||||||
|
"none"
|
||||||
|
"base"
|
||||||
|
"server"
|
||||||
|
"desktop"
|
||||||
|
];
|
||||||
|
default = "none";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkMerge [
|
||||||
|
(mkIf (role == "base") {
|
||||||
|
ataraxia.defaults.nix.enable = true;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user