diff --git a/hosts/temmie/configuration.nix b/hosts/temmie/configuration.nix index 523c517..cc7b1c0 100644 --- a/hosts/temmie/configuration.nix +++ b/hosts/temmie/configuration.nix @@ -4,6 +4,8 @@ # Include the results of the hardware scan. ./hardware-configuration.nix (fp /base) + + ./services/nfs-mounts.nix ]; # sops.defaultSopsFile = fp /secrets/shark/shark.yaml; diff --git a/hosts/temmie/services/nfs-mounts.nix b/hosts/temmie/services/nfs-mounts.nix new file mode 100644 index 0000000..125cc20 --- /dev/null +++ b/hosts/temmie/services/nfs-mounts.nix @@ -0,0 +1,21 @@ +{ pkgs, lib, ... }: +{ + fileSystems = let + # See microbel:/etc/exports + shorthandAreas = lib.listToAttrs (map + (l: lib.nameValuePair "/run/pvv-home-mounts/${l}" "homepvv${l}.pvv.ntnu.no:/export/home/pvv/${l}") + [ "a" "b" "c" "d" "h" "i" "j" "k" "l" "m" "z" ]); + in { } + // + (lib.mapAttrs (_: device: { + inherit device; + fsType = "nfs"; + options = [ + "nfsvers=3" + "noauto" + "proto=tcp" + "x-systemd.automount" + "x-systemd.idle-timeout=300" + ]; + }) shorthandAreas); +}