chore: drop netboot-related things, never worked

This commit is contained in:
Malte Tammena 2024-03-03 11:23:49 +01:00
parent 2f67e8d8d5
commit 69e24bd148
2 changed files with 0 additions and 80 deletions

View file

@ -1,36 +0,0 @@
{
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/netboot/netboot-minimal.nix")
];
config = {
networking.hostName = "chrysomallon-squamiferum";
networking.networkmanager.enable = true;
networking.wireless.enable = false;
networking.firewall.enable = false;
settings.ssh.openOutsideVPN = true;
users.users.nixos.openssh.authorizedKeys.keyFiles = [../../users/malte/yubikey.pub];
environment.noXlibs = false;
environment.systemPackages = with pkgs; [
# For special computers
chntpw
# For testing
# geekbench
];
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.11"; # Did you read the comment?
};
}

View file

@ -1,44 +0,0 @@
{
writeShellApplication,
pixiecore,
nix,
iptables,
inputs,
build ? inputs.self.nixosConfigurations.chrysomallon-squamiferum.config.system.build,
...
}: let
netboot = writeShellApplication {
name = "netboot";
runtimeInputs = [pixiecore];
text = ''
exec pixiecore boot \
${build.kernel}/bzImage \
${build.netbootRamdisk}/initrd \
--cmdline "init=${build.toplevel}/init loglevel=4" \
--dhcp-no-bind \
--debug \
--port 64172 \
--status-port 64172 \
"$@"
'';
};
in
writeShellApplication {
name = "run-netboot-server";
runtimeInputs = [
netboot
nix
iptables
];
text = ''
# Open required firewall ports
sudo iptables -w -I nixos-fw -p udp -m multiport --dports 67,69,4011 -j ACCEPT
sudo iptables -w -I nixos-fw -p tcp -m tcp --dport 64172 -j ACCEPT
sudo netboot || echo "Closed netboot"
# Close ports
sudo iptables -w -D nixos-fw -p udp -m multiport --dports 67,69,4011 -j ACCEPT
sudo iptables -w -D nixos-fw -p tcp -m tcp --dport 64172 -j ACCEPT
'';
}