krebs.systemd.restartIfCredentialsChange: default = false
This commit is contained in:
parent
2a63d78060
commit
b3c5492b69
@ -108,7 +108,7 @@ let
|
||||
};
|
||||
|
||||
imp = {
|
||||
krebs.systemd.services.exim = {};
|
||||
krebs.systemd.services.exim.restartIfCredentialsChange = true;
|
||||
systemd.services.exim.serviceConfig.LoadCredential =
|
||||
map (dkim: "${dkim.domain}.dkim_private_key:${dkim.private_key}") cfg.dkim;
|
||||
krebs.exim = {
|
||||
|
@ -159,7 +159,9 @@ let
|
||||
) cfg.repos;
|
||||
|
||||
krebs.systemd.services = mapAttrs' (name: _:
|
||||
nameValuePair "repo-sync-${name}" {}
|
||||
nameValuePair "repo-sync-${name}" {
|
||||
restartIfCredentialsChange = true;
|
||||
}
|
||||
) cfg.repos;
|
||||
|
||||
systemd.services = mapAttrs' (name: repo:
|
||||
|
@ -6,11 +6,7 @@
|
||||
type = lib.types.attrsOf (lib.types.submodule {
|
||||
options = {
|
||||
restartIfCredentialsChange = lib.mkOption {
|
||||
# Enabling this by default only makes sense here as the user already
|
||||
# bothered to write down krebs.systemd.services.* = {}. If this
|
||||
# functionality gets upstreamed to systemd.services, restarting
|
||||
# should be disabled by default.
|
||||
default = true;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to restart the service whenever any of its credentials
|
||||
change. Only credentials with an absolute path in LoadCredential=
|
||||
|
@ -232,6 +232,7 @@ with import <stockholm/lib>;
|
||||
) config.krebs.tinc;
|
||||
|
||||
krebs.systemd.services = mapAttrs (netname: cfg: {
|
||||
restartIfCredentialsChange = true;
|
||||
}) config.krebs.tinc;
|
||||
|
||||
systemd.services = mapAttrs (netname: cfg: {
|
||||
|
@ -127,7 +127,7 @@ in {
|
||||
})
|
||||
];
|
||||
|
||||
krebs.systemd.services.ejabberd = {};
|
||||
krebs.systemd.services.ejabberd.restartIfCredentialsChange = true;
|
||||
|
||||
systemd.services.ejabberd = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
@ -26,7 +26,7 @@ in {
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
krebs.systemd.services.x0vncserver = {};
|
||||
krebs.systemd.services.x0vncserver.restartIfCredentialsChange = true;
|
||||
systemd.services.x0vncserver = {
|
||||
after = [ "graphical.target" ];
|
||||
requires = [ "graphical.target" ];
|
||||
|
Loading…
Reference in New Issue
Block a user