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 = { systemd.services.munged = {
wantedBy = [ "multi-user.target" ]; 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 ]; path = [ pkgs.munge pkgs.coreutils ];
serviceConfig = { serviceConfig = {
ExecStartPre = "+${pkgs.coreutils}/bin/chmod 0400 ${cfg.password}"; ExecStartPre = "+${pkgs.coreutils}/bin/chmod 0400 ${cfg.password}";
ExecStart = "${pkgs.munge}/bin/munged --syslog --key-file ${cfg.password}"; ExecStart = "${pkgs.munge}/bin/munged --foreground --key-file ${cfg.password}";
PIDFile = "/run/munge/munged.pid";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
User = "munge"; User = "munge";
Group = "munge"; Group = "munge";
StateDirectory = "munge"; StateDirectory = "munge";
StateDirectoryMode = "0711"; StateDirectoryMode = "0711";
Restart = "on-failure";
RuntimeDirectory = "munge"; RuntimeDirectory = "munge";
}; };