38 lines
820 B
Nix
38 lines
820 B
Nix
# modules/services.nix
|
|
{
|
|
config,
|
|
lib,
|
|
tier ? "starter",
|
|
...
|
|
}:
|
|
with lib; let
|
|
tiers = {
|
|
starter = {
|
|
services = ["portainer" "caddy" "n8n"];
|
|
description = "Basic management tools";
|
|
};
|
|
premium = {
|
|
services = ["portainer" "caddy" "n8n" "baserow"];
|
|
description = "Automation and database tools";
|
|
};
|
|
};
|
|
in {
|
|
imports =
|
|
map
|
|
(serviceName: import ../services/${serviceName})
|
|
tiers.${tier}.services;
|
|
|
|
options.services.selfHostPlaybook = {
|
|
enable = mkEnableOption "self host playbook";
|
|
tier = mkOption {
|
|
type = types.enum ["starter" "premium"];
|
|
default = "starter";
|
|
description = "Service tier to enable";
|
|
};
|
|
};
|
|
|
|
config = mkIf config.services.selfHostPlaybook.enable {
|
|
# Add any additional configuration here if needed
|
|
};
|
|
}
|