Fixed issue with paths being remounted
I noticed switching got slower and slower as I kept switching and there were a lot of duplicate directories in my mount output. See: https://discourse.nixos.org/t/duplicate-boot-entries-in-mount-output/26923/
This commit is contained in:
parent
00762bbc4e
commit
30832c3ac1
|
@ -17,10 +17,21 @@
|
||||||
boot.loader.grub.zfsSupport = true;
|
boot.loader.grub.zfsSupport = true;
|
||||||
boot.loader.grub.extraPrepareConfig = ''
|
boot.loader.grub.extraPrepareConfig = ''
|
||||||
mkdir -p /boot/efis
|
mkdir -p /boot/efis
|
||||||
for i in /boot/efis/*; do mount $i ; done
|
for i in /boot/efis/* ; do
|
||||||
|
(mount | grep -q "$i")
|
||||||
|
isDirectoryMounted=$?
|
||||||
|
if (test $isDirectoryMounted -ne 0); then
|
||||||
|
mount "$i"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
mkdir -p /boot/efi
|
mkdir -p /boot/efi
|
||||||
mount /boot/efi
|
# mount /boot/efi
|
||||||
|
(mount | grep -q /boot/efi)
|
||||||
|
isDirectoryMounted=$?
|
||||||
|
if (test $isDirectoryMounted -ne 0); then
|
||||||
|
mount /boot/efi
|
||||||
|
fi
|
||||||
'';
|
'';
|
||||||
boot.loader.grub.extraInstallCommands = ''
|
boot.loader.grub.extraInstallCommands = ''
|
||||||
ESP_MIRROR=$(mktemp -d)
|
ESP_MIRROR=$(mktemp -d)
|
||||||
|
|
Loading…
Reference in a new issue