Wait for the NFS hut store to be mounted

This commit is contained in:
Rodrigo Arias 2023-09-18 15:50:37 +02:00
parent 320c58ce48
commit e6014511f5

View File

@ -25,7 +25,27 @@
fileSystems."/nix//store" = {
device = "overlay";
fsType = "overlay";
options = [ "lowerdir=/mnt/hut-nix-store,upperdir=/nix/store,workdir=/mnt/nix-work" ];
options = [
"lowerdir=/mnt/hut-nix-store,upperdir=/nix/store,workdir=/mnt/nix-work"
"x-systemd.requires-mounts-for=/nix/store"
# We need to wait for the NFS mount
"x-systemd.requires-mounts-for=/mnt/hut-nix-store"
];
depends = [ "/nix/store" "/mnt/hut-nix-store" "/mnt/nix-work" ];
};
# Maybe we should move it to a systemd mount, so we avoid the /nix//store
# hack. Example (not tested):
# systemd.mounts = [
# {
# what = "overlay";
# type = "overlay";
# where = "/nix/store";
# options = "lowerdir=/mnt/hut-nix-store,upperdir=/nix/store,workdir=/mnt/nix-work";
# description = "Overlay nix store mount";
# requires = [ "hut-nix-store.mount" ];
# after = [ "mnt-hut\\x2dnix\\x2dstore.mount" ];
# before = [ "nix-daemon.service" ];
# }
# ];
}