[NixOS] Wait for agenix to try to import gpg key
This commit is contained in:
parent
36b8e8d584
commit
fa18612685
@ -10,11 +10,15 @@
|
|||||||
systemd.user.services.import-gpg-key = {
|
systemd.user.services.import-gpg-key = {
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "Import GPG private key";
|
Description = "Import GPG private key";
|
||||||
|
After = [ "agenix.service" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
Install.WantedBy = [ "default.target" ];
|
Install.WantedBy = [ "default.target" ];
|
||||||
Service = {
|
Service = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
ExecStart = "${pkgs.gnupg}/bin/gpg --batch --import /run/user/%U/agenix/gpg-keys";
|
ExecStart =
|
||||||
|
let path = config.age.secrets.gpg-keys.path;
|
||||||
|
in "${pkgs.gnupg}/bin/gpg --batch --import ${path}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user