Compare commits

...

1 Commits

Author SHA1 Message Date
ddc4d8cea0
set up homearea automounts 2023-12-03 04:18:44 +01:00
6 changed files with 32 additions and 0 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -5,6 +5,7 @@
./hardware-configuration.nix
../../base.nix
../../misc/metrics-exporters.nix
../../modules/home-areas.nix
];
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);
}