Merge pull request #275080 from SomeoneSerge/feat/munge-systemd

nixos/munge: update the systemd service
This commit is contained in:
markuskowa 2023-12-30 00:11:12 +01:00 committed by GitHub
commit 15b39c2238
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,19 +45,25 @@ in
systemd.services.munged = {
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
wants = [
"network-online.target"
"time-sync.target"
];
after = [
"network-online.target"
"time-sync.target"
];
path = [ pkgs.munge pkgs.coreutils ];
serviceConfig = {
ExecStartPre = "+${pkgs.coreutils}/bin/chmod 0400 ${cfg.password}";
ExecStart = "${pkgs.munge}/bin/munged --syslog --key-file ${cfg.password}";
PIDFile = "/run/munge/munged.pid";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
ExecStart = "${pkgs.munge}/bin/munged --foreground --key-file ${cfg.password}";
User = "munge";
Group = "munge";
StateDirectory = "munge";
StateDirectoryMode = "0711";
Restart = "on-failure";
RuntimeDirectory = "munge";
};