Added Thingvellir nomad volumes
This commit is contained in:
33
config/nomad.d/host-thingvellir.json
Normal file
33
config/nomad.d/host-thingvellir.json
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"client": {
|
||||
"host_network": {
|
||||
"public": {
|
||||
"interface": "ens3",
|
||||
"reserved_ports": "80,443,2222"
|
||||
}
|
||||
},
|
||||
"host_volume": {
|
||||
"dns-unbound": {
|
||||
"path": "/var/lib/nomad_volumes/dns/unbound",
|
||||
"read_only": false
|
||||
},
|
||||
"dns-pihole": {
|
||||
"path": "/var/lib/nomad_volumes/dns/pihole/etc-pihole",
|
||||
"read_only": false
|
||||
},
|
||||
"dns-dnsmasq": {
|
||||
"path": "/var/lib/nomad_volumes/dns/pihole/etc-dnsmasq.d",
|
||||
"read_only": false
|
||||
},
|
||||
|
||||
"caddyfile": {
|
||||
"path": "/var/lib/nomad_volumes/caddy/Caddyfile",
|
||||
"read_only": false
|
||||
},
|
||||
"caddy-data": {
|
||||
"path": "/var/lib/nomad_volumes/caddy/data",
|
||||
"read_only": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -53,6 +53,7 @@ with lib;
|
||||
server.nomad = {
|
||||
enable = true;
|
||||
server = true;
|
||||
host-config = ../../config/nomad.d/host-thingvellir.json;
|
||||
};
|
||||
|
||||
# - Editors and development ------------------
|
||||
|
||||
@@ -13,6 +13,12 @@ in
|
||||
description = "Set to true if configured a server - otherwise a client is assumed";
|
||||
};
|
||||
|
||||
host-config = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.path;
|
||||
default = null;
|
||||
description = "Additional host-specific config file";
|
||||
};
|
||||
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
# services.consul.enable = true;
|
||||
@@ -45,6 +51,12 @@ in
|
||||
target = "nomad.d/server.json";
|
||||
source = ../../config/nomad.d/server.json;
|
||||
};
|
||||
} // lib.optionalAttrs cfg.host-config {
|
||||
# Host-specific configuration
|
||||
nomad-host-cfg = {
|
||||
target = "nomad.d/host.json";
|
||||
source = cfg.host-config;
|
||||
};
|
||||
};
|
||||
|
||||
age.secrets = {
|
||||
|
||||
Reference in New Issue
Block a user