commit 6e95932e0ee55f8ce99891d62b6c7990a153d25f parent 9f9558c9e814655dfc7e2c7525ca7f2d124d0988 Author: Daniel Barlow <dan@telent.net> Date: Fri, 17 Mar 2023 11:53:26 +0000 untested fix for unable to mount usb disk at boot Diffstat:
| M | examples/arhcive.nix | | | 10 | ++++++++-- |
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/examples/arhcive.nix b/examples/arhcive.nix @@ -108,7 +108,7 @@ in rec { }; programs.busybox = { - applets = ["blkid" "lsusb" "tar"]; + applets = ["blkid" "lsusb" "findfs" "tar"]; options = { FEATURE_LS_TIMESTAMPS = "y"; FEATURE_LS_SORTFILES = "y"; @@ -121,7 +121,13 @@ in rec { services.mount_external_disk = oneshot { name = "mount_external_disk"; - up = "mount -t ext4 LABEL=backup-disk /srv"; + up = '' + while ! findfs LABEL=backup-disk; do + echo waiting for backup-disk + sleep 1 + done + mount -t ext4 LABEL=backup-disk /srv + ''; down = "umount /srv"; };