arhcive: make it work when disk is attached before boot

This is a bit of a kludge (a lot of a kludge) but it will
get it running whilt I work on something better
This commit is contained in:
Daniel Barlow 2024-04-17 18:49:30 +01:00
parent 68eb1360f6
commit adf62d4483

View file

@ -88,6 +88,16 @@ in rec {
fstype = "ext4";
};
# until we support retained uevent state, we need to push coldplug
# events to mount_external_disk to account for the case that the
# disk is already plugged at boot time
services.fudge_coldplug = oneshot {
name = "fudge_coldplug";
up = "sleep 5; for i in /sys/class/block/*/uevent; do echo 'change' > $i ;done";
dependencies = [ services.mount_external_disk ];
};
services.rsync =
let
secrets_file = oneshot rec {