netboot: init

This commit is contained in:
Astro 2021-06-18 19:56:49 +02:00
parent bde21798b5
commit 7c0205f47e
5 changed files with 34 additions and 0 deletions

View File

@ -52,6 +52,9 @@ in
option domain-name-servers 172.20.73.8, 9.9.9.9;
ddns-domainname "${domainName}";
next-server "${config.site.net.serv.hosts4.netboot}";
filename "netboot.xyz.kpxe";
subnet ${subnet4Net} netmask ${lib.netmasks.${toString subnet4Len}} {
range ${dhcp.start} ${dhcp.end};
}

View File

@ -0,0 +1,17 @@
{ lib, pkgs, ... }:
let
netboot_xyz = pkgs.fetchurl {
url = "https://github.com/netbootxyz/netboot.xyz/releases/download/2.0.40/netboot.xyz.kpxe";
sha256 = "1crkr995i1hv3q548gx2xan1ymxmzcnr7mxaf77s2410mpqfcx82";
};
tftpRoot = pkgs.runCommand "tftproot" {} ''
mkdir -p $out
ln -s ${netboot_xyz} $out/netboot.xyz.kpxe
'';
in
{
services.tftpd = {
enable = true;
path = tftpRoot;
};
}

View File

@ -40,5 +40,8 @@ in {
] ++
optionals (hostName == "mgmt-gw") [
./container/mgmt-gw.nix
] ++
optionals (hostName == "netboot") [
./container/netboot.nix
];
}

View File

@ -214,6 +214,7 @@ hosts-inet:
leonos: 172.20.73.47
minetest: 172.20.73.48
hydra: 172.20.73.49
netboot: 172.20.73.50
# TODO: generate from subnets
priv1:
@ -463,6 +464,7 @@ hosts-inet6:
stats: fd23:42:c3d2:582:2:0:0:3
radius: fd23:42:c3d2:582:2:0:0:4
zeit: fd23:42:c3d2:582:2:0:0:5
netboot: fd23:42:c3d2:582:2:0:0:6
dnscache: fd23:42:c3d2:582:f096:dbff:fee8:427d
minetest: fd23:42:c3d2:582:c3a:42ff:fe5d:b20c
hydra: fd23:42:c3d2:582:e03c:d7ff:fe8e:fe16
@ -635,6 +637,7 @@ hosts-inet6:
stats: 2a00:8180:2c00:282:2:0:0:3
radius: 2a00:8180:2c00:282:2:0:0:4
zeit: 2a00:8180:2c00:282:2:0:0:5
netboot: 2a00:8180:2c00:282:2:0:0:3
dnscache: 2a00:8180:2c00:282:f096:dbff:fee8:427d
minetest: 2a00:8180:2c00:282:c3a:42ff:fe5d:b20c
hydra: 2a00:8180:2c00:282:e03c:d7ff:fe8e:fe16

View File

@ -599,6 +599,14 @@ containers:
gw6: serv-gw
hwaddr: 0A:14:48:01:15:00
netboot:
interfaces:
serv:
type: veth
gw: serv-gw
gw6: serv-gw
hwaddr: 0A:14:48:01:15:01
mgmt-gw:
interfaces:
core: