Loading nixos/modules/system/etc/etc.nix +16 −0 Original line number Diff line number Diff line Loading @@ -276,6 +276,22 @@ in # Unmount the top /etc mount to atomically reveal the new mount. umount --lazy --recursive /etc # Unmount the temporary mount umount --lazy "$tmpEtcMount" rmdir "$tmpEtcMount" # Unmount old metadata mounts # For some reason, `findmnt /tmp --submounts` does not show the nested # mounts. So we'll just find all mounts of type erofs and filter on the # name of the mountpoint. findmnt --type erofs --list --kernel --output TARGET | while read -r mountPoint; do if [[ "$mountPoint" =~ ^/tmp/nixos-etc-metadata\..{10}$ && "$mountPoint" != "$tmpMetadataMount" ]]; then umount --lazy $mountPoint rmdir "$mountPoint" fi done fi '' else '' # Set up the statically computed bits of /etc. Loading Loading
nixos/modules/system/etc/etc.nix +16 −0 Original line number Diff line number Diff line Loading @@ -276,6 +276,22 @@ in # Unmount the top /etc mount to atomically reveal the new mount. umount --lazy --recursive /etc # Unmount the temporary mount umount --lazy "$tmpEtcMount" rmdir "$tmpEtcMount" # Unmount old metadata mounts # For some reason, `findmnt /tmp --submounts` does not show the nested # mounts. So we'll just find all mounts of type erofs and filter on the # name of the mountpoint. findmnt --type erofs --list --kernel --output TARGET | while read -r mountPoint; do if [[ "$mountPoint" =~ ^/tmp/nixos-etc-metadata\..{10}$ && "$mountPoint" != "$tmpMetadataMount" ]]; then umount --lazy $mountPoint rmdir "$mountPoint" fi done fi '' else '' # Set up the statically computed bits of /etc. Loading