nixos/homepage-dashboard: Set ALLOWED_HOSTS env var. (#399179)

Changed files
+16 -1
nixos
doc
manual
release-notes
modules
services
+2
nixos/doc/manual/release-notes/rl-2505.section.md
···
- `programs.clash-verge.tunMode` was deprecated and removed because now service mode is necessary to start program. Without `programs.clash-verge.enable`, clash-verge-rev will refuse to start.
+
- `services.homepage-dashboard` now requires the `allowedHosts` option to be set in accordance with the [documentation](https://gethomepage.dev/installation/#homepage_allowed_hosts).
+
- `services.netbird.tunnels` was renamed to [`services.netbird.clients`](#opt-services.netbird.clients),
hardened (using dedicated less-privileged users) and significantly extended.
+14 -1
nixos/modules/services/misc/homepage-dashboard.nix
···
lib,
...
}:
-
let
cfg = config.services.homepage-dashboard;
# Define the settings format used for this program
···
type = lib.types.int;
default = 8082;
description = "Port for Homepage to bind to.";
+
};
+
+
allowedHosts = lib.mkOption {
+
type = lib.types.str;
+
default = "localhost:8082,127.0.0.1:8082";
+
example = "example.com";
+
description = ''
+
Hosts that homepage-dashboard will be running under.
+
You will want to change this in order to acess homepage from anything other than localhost.
+
see the upsream documentation:
+
+
<https://gethomepage.dev/installation/#homepage_allowed_hosts>
+
'';
};
environmentFile = lib.mkOption {
···
NIXPKGS_HOMEPAGE_CACHE_DIR = "/var/cache/homepage-dashboard";
PORT = toString cfg.listenPort;
LOG_TARGETS = "stdout";
+
HOMEPAGE_ALLOWED_HOSTS = cfg.allowedHosts;
};
serviceConfig = {