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

@@ -134,6 +134,12 @@ in
default = null;
description = "Host headers accepted by Homepage. Defaults to matching address and route registry entries.";
};
environmentFile = lib.mkOption {
type = lib.types.path;
default = "/run/secrets/homepage.env";
description = "Environment file passed to Homepage.";
};
};
config = lib.mkIf cfg.enable {
@@ -141,6 +147,7 @@ in
enable = true;
openFirewall = true;
inherit (cfg) listenPort;
environmentFiles = [ cfg.environmentFile ];
allowedHosts = lib.concatStringsSep "," (if cfg.allowedHosts == null then derivedAllowedHosts else cfg.allowedHosts);
services = homepageServices;
widgets = [
@@ -150,6 +157,14 @@ in
text = "tracion";
};
}
{
openmeteo = {
units = "metric";
latitude = "{{HOMEPAGE_VAR_LATITUDE}}";
longitude = "{{HOMEPAGE_VAR_LONGITUDE}}";
cache = 5;
};
}
{
datetime = {
text_size = "xl";