mirror of
https://github.com/ryantm/agenix.git
synced 2024-11-25 11:08:30 +03:00
fix: workaround for #54
This commit is contained in:
parent
e6752e7b85
commit
375a33cd97
1 changed files with 24 additions and 13 deletions
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, options, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -103,7 +103,9 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = mkIf (cfg.secrets != { }) {
|
config = mkIf (cfg.secrets != { }) (mkMerge [
|
||||||
|
|
||||||
|
{
|
||||||
assertions = [{
|
assertions = [{
|
||||||
assertion = cfg.sshKeyPaths != [ ];
|
assertion = cfg.sshKeyPaths != [ ];
|
||||||
message = "age.sshKeyPaths must be set.";
|
message = "age.sshKeyPaths must be set.";
|
||||||
|
@ -116,5 +118,14 @@ in
|
||||||
|
|
||||||
# Other secrets need to wait for users and groups to exist.
|
# Other secrets need to wait for users and groups to exist.
|
||||||
system.activationScripts.agenix = stringAfter [ "users" "groups" "specialfs" ] installNonRootSecrets;
|
system.activationScripts.agenix = stringAfter [ "users" "groups" "specialfs" ] installNonRootSecrets;
|
||||||
};
|
|
||||||
|
}
|
||||||
|
|
||||||
|
# workaround for #54
|
||||||
|
(optionalAttrs (builtins.hasAttr "dryActivationScript" options.system) {
|
||||||
|
system.activationScripts.users.supportsDryActivation = mkForce false;
|
||||||
|
system.activationScripts.groups.supportsDryActivation = mkForce false;
|
||||||
|
})
|
||||||
|
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue