diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2022-09-12 00:02:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-12 00:02:43 +0000 |
commit | 33ef8defa266373b55e2bc96a9c0bf51c0d5eb3e (patch) | |
tree | 26a436b514129e065a7546d0c63829633721bb0a /nixos | |
parent | 6ec60fd2225cf57a06129b9bca02b10d4db4271f (diff) | |
parent | faa93c4e19e79e7a6de31d6d3492b8f00760ca82 (diff) |
Merge master into staging-next
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/misc/paperless.nix | 10 | ||||
-rw-r--r-- | nixos/modules/services/system/cachix-agent/default.nix | 11 |
2 files changed, 15 insertions, 6 deletions
diff --git a/nixos/modules/services/misc/paperless.nix b/nixos/modules/services/misc/paperless.nix index 0a62af95f8f13..b3b1d265c19ec 100644 --- a/nixos/modules/services/misc/paperless.nix +++ b/nixos/modules/services/misc/paperless.nix @@ -16,13 +16,13 @@ let PAPERLESS_MEDIA_ROOT = cfg.mediaDir; PAPERLESS_CONSUMPTION_DIR = cfg.consumptionDir; GUNICORN_CMD_ARGS = "--bind=${cfg.address}:${toString cfg.port}"; - } // ( - lib.mapAttrs (_: toString) cfg.extraConfig - ) // optionalAttrs (config.time.timeZone != null) { - PAPERLESS_TIME_ZONE = lib.mkDefault config.time.timeZone; + } // optionalAttrs (config.time.timeZone != null) { + PAPERLESS_TIME_ZONE = config.time.timeZone; } // optionalAttrs enableRedis { PAPERLESS_REDIS = "unix://${redisServer.unixSocket}"; - }; + } // ( + lib.mapAttrs (_: toString) cfg.extraConfig + ); manage = let setupEnv = lib.concatStringsSep "\n" (mapAttrsToList (name: val: "export ${name}=\"${val}\"") env); diff --git a/nixos/modules/services/system/cachix-agent/default.nix b/nixos/modules/services/system/cachix-agent/default.nix index 64b31b3b01c60..5b529c1789e2b 100644 --- a/nixos/modules/services/system/cachix-agent/default.nix +++ b/nixos/modules/services/system/cachix-agent/default.nix @@ -29,6 +29,12 @@ in { description = lib.mdDoc "Profile name, defaults to 'system' (NixOS)."; }; + host = mkOption { + type = types.str; + default = null; + description = lib.mdDoc "Cachix uri to use."; + }; + package = mkOption { type = types.package; default = pkgs.cachix; @@ -63,7 +69,10 @@ in { KillMode = "process"; Restart = "on-failure"; EnvironmentFile = cfg.credentialsFile; - ExecStart = "${cfg.package}/bin/cachix ${lib.optionalString cfg.verbose "--verbose"} deploy agent ${cfg.name} ${if cfg.profile != null then cfg.profile else ""}"; + ExecStart = '' + ${cfg.package}/bin/cachix ${lib.optionalString cfg.verbose "--verbose"} ${lib.optionalString (cfg.host != null) "--host ${cfg.host}"} \ + deploy agent ${cfg.name} ${if cfg.profile != null then cfg.profile else ""} + ''; }; }; }; |