WIP: configure bikkje as login server #24

Draft
felixalb wants to merge 5 commits from setup-bikkje-login into main
2 changed files with 29 additions and 4 deletions
Showing only changes of commit c683a6d4c2 - Show all commits

View File

@ -2,9 +2,13 @@
{ {
containers.bikkje = { containers.bikkje = {
autoStart = true; autoStart = true;
interfaces = [ "enp14s0f1" ]; interfaces = [ "enp4s0f0" ];
config = { config, pkgs, ... }: { config = { config, pkgs, ... }: {
imports = [
../../modules/home-areas.nix
];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
zsh zsh
bash bash
@ -87,8 +91,10 @@
useHostResolvConf = lib.mkForce false; useHostResolvConf = lib.mkForce false;
hostName = "bikkje"; hostName = "bikkje";
}; };
systemd.network.networks."30-enp14s0f1" = values.defaultNetworkConfig // {
matchConfig.Name = "enp14s0f1"; systemd.network.enable = true;
systemd.network.networks."30-enp4s0f0" = values.defaultNetworkConfig // {
matchConfig.Name = "enp4s0f0";
address = with values.hosts.bikkje; [ (ipv4 + "/25") (ipv6 + "/64") ]; address = with values.hosts.bikkje; [ (ipv4 + "/25") (ipv6 + "/64") ];
}; };
@ -99,6 +105,5 @@
# TODO # TODO
# - Kerberos Authentication # - Kerberos Authentication
# - Home directory mounts
# - Mail Transfer Agent # - Mail Transfer Agent
} }

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

@ -0,0 +1,20 @@
{ 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"
"proto=tcp"
"nofail"
"_netdev"
];
}) homeMounts);
}