1
0
Fork 0

set up homearea automounts

This commit is contained in:
Oystein Kristoffer Tveit 2023-12-03 04:18:09 +01:00
parent 28e3f5672c
commit ddc4d8cea0
Signed by untrusted user: oysteikt
GPG Key ID: 9F2F7D8250F35146
6 changed files with 32 additions and 0 deletions

View File

@ -5,6 +5,7 @@
../../base.nix ../../base.nix
../../misc/metrics-exporters.nix ../../misc/metrics-exporters.nix
../../modules/home-areas.nix
#./services/keycloak.nix #./services/keycloak.nix

View File

@ -5,6 +5,7 @@
../../base.nix ../../base.nix
../../misc/metrics-exporters.nix ../../misc/metrics-exporters.nix
../../modules/home-areas.nix
./services/nginx ./services/nginx
./acmeCert.nix ./acmeCert.nix

View File

@ -5,6 +5,7 @@
./hardware-configuration.nix ./hardware-configuration.nix
../../base.nix ../../base.nix
../../misc/metrics-exporters.nix ../../misc/metrics-exporters.nix
../../modules/home-areas.nix
./services/openvpn-client.nix ./services/openvpn-client.nix
]; ];

View File

@ -5,6 +5,7 @@
./hardware-configuration.nix ./hardware-configuration.nix
../../base.nix ../../base.nix
../../misc/metrics-exporters.nix ../../misc/metrics-exporters.nix
../../modules/home-areas.nix
./services/nginx ./services/nginx
./services/metrics ./services/metrics

View File

@ -5,6 +5,7 @@
./hardware-configuration.nix ./hardware-configuration.nix
../../base.nix ../../base.nix
../../misc/metrics-exporters.nix ../../misc/metrics-exporters.nix
../../modules/home-areas.nix
]; ];
sops.defaultSopsFile = ../../secrets/shark/shark.yaml; sops.defaultSopsFile = ../../secrets/shark/shark.yaml;

27
modules/home-areas.nix Normal file
View File

@ -0,0 +1,27 @@
{ pkgs, lib, ... }:
{
fileSystems = let
shorthandAreas = {
# See toriel:/etc/exports
"/home/pvv/t/pederbs" = "homepvvt.pvv.ntnu.no:/export/home/pvv/t/pederbs";
"/home/pvv/t/yorinad" = "homepvvt.pvv.ntnu.no:/export/home/pvv/t/yorinad";
}
//
# See microbel:/etc/exports
(lib.listToAttrs (map
(l: lib.nameValuePair "/home/pvv/${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);
}