cachix-agent: add host option
This commit is contained in:
parent
44ef157f55
commit
fbc23b491a
1 changed files with 10 additions and 1 deletions
|
@ -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