Unverified Commit 4910b0b7 authored by h7x4's avatar h7x4 Committed by GitHub
Browse files

nixos/mealie: add extraOptions to allow setting trusted proxies (#408843)

parents 414226f6 a7f40a26
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -39,6 +39,18 @@ in
      };
    };

    extraOptions = lib.mkOption {
      type = lib.types.listOf lib.types.str;
      default = [ ];
      example = [
        "--log-level"
        "debug"
      ];
      description = ''
        Specifies extra command line arguments to pass to mealie (Gunicorn).
      '';
    };

    credentialsFile = lib.mkOption {
      type = with lib.types; nullOr path;
      default = null;
@@ -84,7 +96,7 @@ in
        DynamicUser = true;
        User = "mealie";
        ExecStartPre = "${pkg}/libexec/init_db";
        ExecStart = "${lib.getExe pkg} -b ${cfg.listenAddress}:${builtins.toString cfg.port}";
        ExecStart = "${lib.getExe pkg} -b ${cfg.listenAddress}:${builtins.toString cfg.port} ${lib.escapeShellArgs cfg.extraOptions}";
        EnvironmentFile = lib.mkIf (cfg.credentialsFile != null) cfg.credentialsFile;
        StateDirectory = "mealie";
        StandardOutput = "journal";