nix-cfg/hosts/vps1/data/default.nix

12 lines
No EOL
349 B
Nix

let
host = builtins.fromTOML (builtins.readFile ./host.toml);
rootDomain = host.rootDomain;
services = builtins.fromTOML (builtins.readFile ./services.toml);
in
{
inherit host;
services = builtins.mapAttrs (name: values:
values //
(if values ? subdomain then {domain = "${values.subdomain}.${rootDomain}";} else {})
) services;
}