feat: simplified the config for running services, only one hosts config is required now in each server config file
This commit is contained in:
parent
f8c7860eb5
commit
379cb84839
34 changed files with 200 additions and 581 deletions
|
@ -18,17 +18,10 @@ in {
|
|||
];
|
||||
|
||||
options.services.skynet."${name}" = {
|
||||
host = {
|
||||
ip = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
};
|
||||
enable = mkEnableOption "Skynet Public Keyserver";
|
||||
};
|
||||
|
||||
config = {
|
||||
config = mkIf cfg.enable {
|
||||
services.skynet.acme.domains = [
|
||||
"${name}.skynet.ie"
|
||||
];
|
||||
|
@ -37,7 +30,7 @@ in {
|
|||
{
|
||||
record = "${name}";
|
||||
r_type = "CNAME";
|
||||
value = cfg.host.name;
|
||||
value = config.services.skynet.host.name;
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
@ -20,14 +20,7 @@ in {
|
|||
];
|
||||
|
||||
options.services.skynet."${name}" = {
|
||||
host = {
|
||||
ip = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
};
|
||||
enable = mkEnableOption "Skynet Open Governance";
|
||||
};
|
||||
|
||||
config = {
|
||||
|
@ -39,7 +32,7 @@ in {
|
|||
{
|
||||
record = "${name}";
|
||||
r_type = "CNAME";
|
||||
value = cfg.host.name;
|
||||
value = config.services.skynet.host.name;
|
||||
}
|
||||
];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue