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

12 lines
349 B
Nix
Raw Permalink Normal View History

2024-05-15 21:14:50 +02:00
let
host = builtins.fromTOML (builtins.readFile ./host.toml);
rootDomain = host.rootDomain;
services = builtins.fromTOML (builtins.readFile ./services.toml);
2024-05-15 21:14:50 +02:00
in
{
inherit host;
services = builtins.mapAttrs (name: values:
values //
(if values ? subdomain then {domain = "${values.subdomain}.${rootDomain}";} else {})
) services;
}