mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-19 04:02:10 +00:00
Merge pull request #190837 from domenkozar/cachix-agent-host
cachix-agent: add host option
This commit is contained in:
commit
3582beec60
|
@ -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 ""}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue