diff --git a/m/module/shared-nix-store.nix b/m/module/shared-nix-store.nix new file mode 100644 index 0000000..1c19fd9 --- /dev/null +++ b/m/module/shared-nix-store.nix @@ -0,0 +1,18 @@ +{ ... }: +{ + # Don't make the nix store read-only, as this would prevent the overlay FS + # from being able to mount it. + boot.readOnlyNixStore = false; + + # Mount the hut nix store via NFS + fileSystems."/mnt/hut-nix-store" = { + device = "hut:/nix/store"; + fsType = "nfs"; + options = [ "ro" ]; + }; + + # Create the work directory + #systemd.tmpfiles.rules = [ + # "d /mnt/nix-overlay/work 0550 1000 root root -" + #]; +} diff --git a/m/owl1/configuration.nix b/m/owl1/configuration.nix index 5afda72..052ea8a 100644 --- a/m/owl1/configuration.nix +++ b/m/owl1/configuration.nix @@ -5,6 +5,7 @@ ../common/main.nix ../module/ceph.nix ../module/slurm-firewall.nix + ../module/shared-nix-store.nix ]; # Select the this using the ID to avoid mismatches diff --git a/m/owl2/configuration.nix b/m/owl2/configuration.nix index 9636760..ce95fa2 100644 --- a/m/owl2/configuration.nix +++ b/m/owl2/configuration.nix @@ -5,6 +5,7 @@ ../common/main.nix ../module/ceph.nix ../module/slurm-firewall.nix + ../module/shared-nix-store.nix ]; # Select the this using the ID to avoid mismatches