From d4a2f34f1873081436107a7935109d077bc82fa6 Mon Sep 17 00:00:00 2001 From: Astro Date: Mon, 22 Aug 2022 19:52:10 +0200 Subject: [PATCH] nix/nixos-module/container/netboot: merge into c3d2/nix-config host nfsroot --- config/net/serv.nix | 7 +----- nix/nixos-module/container/dhcp-server.nix | 2 +- nix/nixos-module/container/netboot.nix | 25 ---------------------- nix/nixos-module/default.nix | 3 --- 4 files changed, 2 insertions(+), 35 deletions(-) delete mode 100644 nix/nixos-module/container/netboot.nix diff --git a/config/net/serv.nix b/config/net/serv.nix index f8eb6e9..fdc91c3 100644 --- a/config/net/serv.nix +++ b/config/net/serv.nix @@ -53,7 +53,7 @@ leon = "172.20.73.47"; minetest = "172.20.73.48"; hydra = "172.20.73.49"; - netboot = "172.20.73.50"; + # UNUSED = "172.20.73.50"; nfsroot = "172.20.73.51"; ticker = "172.20.73.52"; gitea = "172.20.73.53"; @@ -97,7 +97,6 @@ mobilizon = "fd23:42:c3d2:582:48d1:5cff:fea7:1676"; mongo = "fd23:42:c3d2:582:14ec:c8ff:fe0a:fc5c"; mucbot = "fd23:42:c3d2:582:28db:dff:fe6b:e89a"; - netboot = "fd23:42:c3d2:582:2:0:0:6"; radiobert = "fd23:42:c3d2:582:e65f:1ff:fe5d:1679"; radius = "fd23:42:c3d2:582:2:0:0:4"; sdrweb = "fd23:42:c3d2:582:3078:bbff:fe76:e9ef"; @@ -130,7 +129,6 @@ mobilizon = "2a00:8180:2c00:282:48d1:5cff:fea7:1676"; mongo = "2a00:8180:2c00:282:14ec:c8ff:fe0a:fc5c"; mucbot = "2a00:8180:2c00:282:28db:dff:fe6b:e89a"; - netboot = "2a00:8180:2c00:282:2:0:0:6"; public-access-proxy = "2a00:8180:2c00:282:1024:5fff:febd:9be7"; radiobert = "2a00:8180:2c00:282:e65f:1ff:fe5d:1679"; radius = "2a00:8180:2c00:282:2:0:0:4"; @@ -176,9 +174,6 @@ dnscache = makeContainer { services.dnscache.enable = true; }; - netboot = makeContainer { - interfaces.serv.hwaddr = "0A:14:48:01:15:01"; - }; serv-gw = makeContainer { interfaces = { core = { diff --git a/nix/nixos-module/container/dhcp-server.nix b/nix/nixos-module/container/dhcp-server.nix index 696a80a..82f34e1 100644 --- a/nix/nixos-module/container/dhcp-server.nix +++ b/nix/nixos-module/container/dhcp-server.nix @@ -53,7 +53,7 @@ in option domain-name-servers 172.20.73.8, 9.9.9.9; ddns-domainname "${domainName}"; - next-server ${config.site.net.serv.hosts4.netboot}; + next-server ${config.site.net.serv.hosts4.nfsroot}; if option arch = 00:00 { filename "netboot.xyz.kpxe"; } else { diff --git a/nix/nixos-module/container/netboot.nix b/nix/nixos-module/container/netboot.nix deleted file mode 100644 index 3b855a3..000000000 --- a/nix/nixos-module/container/netboot.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ pkgs, ... }: -let - netboot_xyz_efi = pkgs.fetchurl { - url = "https://github.com/netbootxyz/netboot.xyz/releases/download/2.0.40/netboot.xyz.efi"; - sha256 = "1gvgvlaxhjkr9i0b2bjq85h12ni9h5fn6r8nphsag3il9kificcc"; - }; - netboot_xyz_kpxe = 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_efi} $out/netboot.xyz.efi - ln -s ${netboot_xyz_kpxe} $out/netboot.xyz.kpxe - cp -rs ${pkgs.raspberrypifw}/share/raspberrypi/boot/* $out/ - echo "kernel=kernel8.img" > $out/config.txt - echo "dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/nfs nfsroot=172.22.99.20:/mnt/cephfs/c3d2/hosts/rpi-nfsroot,nolock,vers=3 nfsrootdebug ro rootwait ip=dhcp rootfstype=nfs verbose" > $out/cmdline.txt - ''; -in -{ - services.atftpd = { - enable = true; - root = tftpRoot; - }; -} diff --git a/nix/nixos-module/default.nix b/nix/nixos-module/default.nix index d899867..cfc59d0 100644 --- a/nix/nixos-module/default.nix +++ b/nix/nixos-module/default.nix @@ -37,9 +37,6 @@ in { optionals (hostName == "mgmt-gw") [ ./container/mgmt-gw.nix ] ++ - optionals (hostName == "netboot") [ - ./container/netboot.nix - ] ++ optionals (hostName == "vpn-gw") [ ./container/vpn.nix ];