remove triggers-rebuild

as discussed as part of the PR

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
ahuston-0 2024-05-19 11:39:29 -04:00 committed by Alice Huston
parent 7cd32e0018
commit 05fc189ec7

View File

@ -8,7 +8,6 @@
let
cfg = config.services.autopull;
# autopull-type = lib.types.submodule { #
autopull-type =
with lib.types;
attrsOf (
@ -41,12 +40,6 @@ let
default = "";
description = "ssh-key used to pull the repository";
};
triggers-rebuild = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Whether or not the rebuild service should be triggered after pulling. Note that system.autoUpgrade must be pointed at the same directory as this service if you'd like to use this option.";
};
};
}
)
@ -78,14 +71,11 @@ in
repo-name,
ssh-key,
path,
triggers-rebuild,
...
}:
lib.nameValuePair "autopull@${repo-name}" {
requires = [ "multi-user.target" ];
wants = lib.optionals (triggers-rebuild) [ "nixos-service.service" ];
after = [ "multi-user.target" ];
before = lib.optionals (triggers-rebuild) [ "nixos-upgrade.service" ];
description = "Pull the latest data for ${repo-name}";
environment = lib.mkIf (ssh-key != "") {
GIT_SSH_COMMAND = "${pkgs.openssh}/bin/ssh -i ${ssh-key} -o IdentitiesOnly=yes";