bikkje: mount home directories
Some checks failed
Eval nix flake / evals (push) Failing after 1m50s

This commit is contained in:
Oystein Kristoffer Tveit 2023-12-03 04:18:09 +01:00 committed by Felix Albrigtsen
parent 5e30f30ac2
commit d127cf7b05
2 changed files with 25 additions and 1 deletions

View File

@ -5,6 +5,10 @@
interfaces = [ "enp14s0f1" ]; interfaces = [ "enp14s0f1" ];
config = { config, pkgs, ... }: { config = { config, pkgs, ... }: {
imports = [
../../modules/home-areas.nix
];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
zsh zsh
bash bash
@ -99,6 +103,5 @@
# TODO # TODO
# - Kerberos Authentication # - Kerberos Authentication
# - Home directory mounts
# - Mail Transfer Agent # - Mail Transfer Agent
} }

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

@ -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);
}