mirror of
https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git
synced 2026-01-15 03:48:24 +01:00
temmie: mount nfs shares from microbel
This commit is contained in:
@@ -4,6 +4,8 @@
|
|||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
(fp /base)
|
(fp /base)
|
||||||
|
|
||||||
|
./services/nfs-mounts.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# sops.defaultSopsFile = fp /secrets/shark/shark.yaml;
|
# sops.defaultSopsFile = fp /secrets/shark/shark.yaml;
|
||||||
|
|||||||
21
hosts/temmie/services/nfs-mounts.nix
Normal file
21
hosts/temmie/services/nfs-mounts.nix
Normal file
@@ -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);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user