set up homearea automounts
Eval nix flake / evals (push) Successful in 41m25s Details

This commit is contained in:
Oystein Kristoffer Tveit 2023-12-03 04:18:09 +01:00
parent 28e3f5672c
commit ed1ca817e6
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);
}