diff --git a/hosts/buskerud/bikkje.nix b/hosts/buskerud/bikkje.nix index ea1dcec..c11b757 100644 --- a/hosts/buskerud/bikkje.nix +++ b/hosts/buskerud/bikkje.nix @@ -5,6 +5,10 @@ interfaces = [ "enp14s0f1" ]; config = { config, pkgs, ... }: { + imports = [ + ../../modules/home-areas.nix + ]; + environment.systemPackages = with pkgs; [ zsh bash @@ -99,6 +103,5 @@ # TODO # - Kerberos Authentication - # - Home directory mounts # - Mail Transfer Agent } diff --git a/modules/home-areas.nix b/modules/home-areas.nix new file mode 100644 index 0000000..3164f81 --- /dev/null +++ b/modules/home-areas.nix @@ -0,0 +1,21 @@ +{ pkgs, lib, ... }: +{ + fileSystems = let + # See microbel:/etc/exports + homeMounts = (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" + ]; + }) homeMounts); +}