diff options
author | Domen Kožar <domen@dev.si> | 2022-09-11 21:07:45 +0100 |
---|---|---|
committer | Domen Kožar <domen@dev.si> | 2022-09-11 21:18:09 +0100 |
commit | fbc23b491a3a934517430b49b98ab7119d5185b3 (patch) | |
tree | 1e54425da4ba39d0a2bff9a50649bd77e3e746b5 /nixos | |
parent | 44ef157f555e57f529326a6e96a8b9aaedd3413a (diff) |
cachix-agent: add host option
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/system/cachix-agent/default.nix | 11 |
1 files changed, 10 insertions, 1 deletions
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 ""} + ''; }; }; }; |