summary refs log tree commit diff
path: root/nixos/modules/system
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 11:37:20 +0100
commitaa69bb5743069f62204433aaa493861bea53755f (patch)
tree267dff825198378bb419c9fae1e3971f8563a810 /nixos/modules/system
parent3c6c93409795cb051549d365cd96c7870ae83a81 (diff)
downloadnixlib-aa69bb5743069f62204433aaa493861bea53755f.tar
nixlib-aa69bb5743069f62204433aaa493861bea53755f.tar.gz
nixlib-aa69bb5743069f62204433aaa493861bea53755f.tar.bz2
nixlib-aa69bb5743069f62204433aaa493861bea53755f.tar.lz
nixlib-aa69bb5743069f62204433aaa493861bea53755f.tar.xz
nixlib-aa69bb5743069f62204433aaa493861bea53755f.tar.zst
nixlib-aa69bb5743069f62204433aaa493861bea53755f.zip
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.
Diffstat (limited to 'nixos/modules/system')
-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 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;