diff --git a/pkgs/by-name/sw/switch-to-configuration-ng/src/src/main.rs b/pkgs/by-name/sw/switch-to-configuration-ng/src/src/main.rs index 802b5e64f1014..46a60a811adc7 100644 --- a/pkgs/by-name/sw/switch-to-configuration-ng/src/src/main.rs +++ b/pkgs/by-name/sw/switch-to-configuration-ng/src/src/main.rs @@ -1293,7 +1293,8 @@ won't take effect until you reboot the system. units_to_reload.insert(unit.to_string(), ()); record_unit(RELOAD_LIST_FILE, &unit) } - } else { + // systemd creates a transient mount unit for /nix/store, that we shouldn't try to unmount + } else if !matches!(mountpoint.as_str(), "/nix/store") { // Filesystem entry disappeared, so unmount it. units_to_stop.insert(unit, ()); }