Draft: Mount the nix store from hut in compute nodes #66

Closed
rarias wants to merge 11 commits from shared-nix-store into master
Showing only changes of commit e6014511f5 - Show all commits

View File

@ -25,7 +25,27 @@
fileSystems."/nix//store" = { fileSystems."/nix//store" = {
device = "overlay"; device = "overlay";
fsType = "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" ]; 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" ];
# }
# ];
} }