From aa69bb5743069f62204433aaa493861bea53755f Mon Sep 17 00:00:00 2001 From: Jörg Thalheim Date: Thu, 27 Sep 2018 21:46:31 +0100 Subject: systemd: don't restart user-runtime-dir@ on upgrades Likewise logind we should not try to restart this service after upgrade, the user's current session depends on it. --- nixos/modules/system/boot/systemd.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'nixos/modules/system/boot') diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index 12e029ae57f8..3ac4c02b61f5 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -886,6 +886,9 @@ in #systemd.services.systemd-logind.restartTriggers = [ config.environment.etc."systemd/logind.conf".source ]; systemd.services.systemd-logind.restartIfChanged = false; systemd.services.systemd-logind.stopIfChanged = false; + # The user-runtime-dir@ service is managed by systemd-logind we should not touch it or else we break the users' sessions. + systemd.services."user-runtime-dir@".stopIfChanged = false; + systemd.services."user-runtime-dir@".restartIfChanged = false; systemd.services.systemd-journald.restartTriggers = [ config.environment.etc."systemd/journald.conf".source ]; systemd.services.systemd-journald.stopIfChanged = false; systemd.targets.local-fs.unitConfig.X-StopOnReconfiguration = true; -- cgit 1.4.1