types.secret-file: add service option

This commit is contained in:
tv 2020-08-04 20:28:04 +02:00
parent 45db34b85f
commit c58835f0e3
2 changed files with 12 additions and 4 deletions

View file

@ -9,8 +9,12 @@
};
systemd.services.nix-serve = {
requires = ["secret.service"];
after = ["secret.service"];
after = [
config.krebs.secret.files.nix-serve-key.service
];
requires = [
config.krebs.secret.files.nix-serve-key.service
];
};
krebs.secret.files.nix-serve-key = {
path = "/run/secret/nix-serve.key";

View file

@ -71,8 +71,12 @@ in
};
config = mkIf cfg.enable {
systemd.services.netdata = {
requires = [ "secret.service" ];
after = [ "secret.service" ];
after = [
config.krebs.secret.files.netdata-stream.service
];
requires = [
config.krebs.secret.files.netdata-stream.service
];
};
krebs.secret.files.netdata-stream = {
path = "/run/secret/netdata-stream.conf";