summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2018-09-27 21:46:31 +0100
committerJörg Thalheim <joerg@thalheim.io>2018-09-28 12:10:36 +0100
commit1e9f50f1569a9c73afeed29c023b727057b7cd67 (patch)
tree7339b2cb51961df15e808ccf320438e9b90a58fa /nixos
parent1e1821c1664f8e9943431832cc9a1169c5bcaa75 (diff)
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.

(cherry picked from commit aa69bb5743069f62204433aaa493861bea53755f)
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/system/boot/systemd.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
index 12e029ae57f87..3ac4c02b61f5a 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;