fix(nixos): source homepage location from secrets

This commit is contained in:
2026-09-15 20:37:04 -04:00
parent 4a42b8459d
commit 06d92a9bcf
2 changed files with 34 additions and 0 deletions

View File

@@ -5,6 +5,7 @@
}:
let
cfg = config.guests.homepage;
environmentFile = "/run/secrets/homepage.env";
in
{
config = lib.mkIf cfg.enable {
@@ -12,6 +13,12 @@ in
interior.modules.services.homepage = {
enable = true;
hostName = config.networking.hostName;
inherit environmentFile;
};
mounts.${environmentFile} = {
file = config.sops.templates."homepage.env".path;
readOnly = true;
};
limits = {
@@ -20,5 +27,17 @@ in
tasksMax = lib.mkDefault 256;
};
};
sops.secrets = {
"services/metadata/latitude" = { };
"services/metadata/longitude" = { };
};
sops.templates."homepage.env" = {
content = ''
HOMEPAGE_VAR_LATITUDE=${config.sops.placeholder."services/metadata/latitude"}
HOMEPAGE_VAR_LONGITUDE=${config.sops.placeholder."services/metadata/longitude"}
'';
};
};
}