Unverified Commit 98d49921 authored by Jon Seager's avatar Jon Seager Committed by GitHub
Browse files

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

parents 2c121735 f7c0ca4a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -416,6 +416,8 @@

- `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
Original line number Diff line number Diff line
@@ -4,7 +4,6 @@
  lib,
  ...
}:

let
  cfg = config.services.homepage-dashboard;
  # Define the settings format used for this program
@@ -29,6 +28,19 @@ in
        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 {
        type = lib.types.str;
        description = ''
@@ -215,6 +227,7 @@ in
        NIXPKGS_HOMEPAGE_CACHE_DIR = "/var/cache/homepage-dashboard";
        PORT = toString cfg.listenPort;
        LOG_TARGETS = "stdout";
        HOMEPAGE_ALLOWED_HOSTS = cfg.allowedHosts;
      };

      serviceConfig = {