21 lines
428 B
Nix
21 lines
428 B
Nix
{ config, lib, namespace, ... }:
|
|
let
|
|
inherit (lib) types mkIf;
|
|
inherit (lib.${namespace}) mkOpt;
|
|
|
|
cfg = config.${namespace}.services.rke2;
|
|
in
|
|
{
|
|
options.${namespace}.services.rke2 = with types; {
|
|
enable = lib.mkEnableOption "Enable RKE2";
|
|
disable = mkOpt (listOf str) [ ] "Disable services";
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
services.rke2 = {
|
|
enable = true;
|
|
disable = cfg.disable;
|
|
};
|
|
};
|
|
}
|