Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6e757d8
vesuvius: netboot prospit
mehbark Oct 23, 2025
3fcba78
corrected netboot configuration to avoid interface leakage and correc…
mikhail729 Nov 6, 2025
10ebb8f
corrected dhcp interface
mikhail729 Nov 6, 2025
eb25e22
hosts/vesuvius: change DNS domain from hephaestus to bastille
mehbark Nov 11, 2025
56bf0e8
hosts/common: refactor to remove k3s-ports.nix
mehbark Nov 11, 2025
7128fff
hosts/prospit: set k3s role
mehbark Nov 11, 2025
4dc169a
hosts/vesuvius: become the k3s cluster init
mehbark Nov 11, 2025
194b9cb
hosts/common/k3s: refactor to take role and clusterInit args
mehbark Nov 11, 2025
3845c0b
hosts/prospit: be adopted by bastille
mehbark Nov 11, 2025
3a8573f
hosts/bastille: fix root password warning
mehbark Nov 11, 2025
6041f78
hosts/bastille: automatically set hostname based on mac address
mehbark Nov 11, 2025
95545c0
hosts/bastille: add some actual names to auto-hostname
mehbark Nov 11, 2025
5364e33
fix(common/k3s): use cluster routing IP for vesuvius
kurisufriend Nov 26, 2025
946ab79
Merge branch 'main' into vesuvius-dnsmasq-netboot
kurisufriend Dec 9, 2025
86cf66c
Merge branch 'main' into vesuvius-dnsmasq-netboot
kurisufriend Dec 9, 2025
4e48b2b
!!breaking!! vesuvius/zfs: bind mount dataset /forge/nix to /nix, kee…
kurisufriend Jan 11, 2026
ba8cc98
hosts/vesuvius: opened port 53 for dns
mikhail729 Jan 22, 2026
77c1bbc
flake: bump
kurisufriend Jan 23, 2026
a3db521
feat(hosts/vesuvius): working freeIPA client
kurisufriend Jan 23, 2026
790c86e
refactor(hosts/vesuvius): use roles/common stuff
kurisufriend Jan 23, 2026
d220159
feat(common/nfs): mount dirtycow stuff
kurisufriend Jan 23, 2026
a0c8787
feat(hosts/vesuvius): include dirtycow mounts
kurisufriend Jan 23, 2026
946dbc4
hosts/vesuvius: added dhcp-host entries for netboot nodes
mikhail729 Jan 23, 2026
59c9833
hosts/bastille: disabled eno1 on lenovo nodes and removed auto-hostna…
mikhail729 Jan 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions hosts/common/k3s-ports.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
networking.firewall.allowedTCPPorts = [
6443
];

networking.firewall.allowedUDPPorts = [
8472
];
}
12 changes: 12 additions & 0 deletions hosts/common/k3s.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{ ... }: {
imports = [
./k3s-ports.nix
];

services.k3s = {
enable = true;
role = "agent";
token = "garbage secret";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use real secret

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be added to the agenix secrets

serverAddr = "https://10.98.1.147:6443";
};
}
15 changes: 15 additions & 0 deletions hosts/prospit/configuration.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{ modulesPath, pkgs, ... }: {
imports = [
../common/k3s.nix
../common/nix.nix
../common/sshd.nix
../common/users-local.nix
(modulesPath + "/installer/netboot/netboot-minimal.nix")
];

environment.systemPackages = [
pkgs.fastfetch
];

system.stateVersion = "25.11";
}
1 change: 1 addition & 0 deletions hosts/vesuvius/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{
imports = [
./hardware-configuration.nix
./k3s.nix
./nix.nix
./zfs.nix
./netboot.nix
Expand Down
12 changes: 12 additions & 0 deletions hosts/vesuvius/k3s.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{ ... }: {
imports = [
../common/k3s-ports.nix
];

services.k3s = {
enable = true;
role = "server";
token = "garbage secret";
clusterInit = true;
};
}
49 changes: 24 additions & 25 deletions hosts/vesuvius/netboot.nix
Original file line number Diff line number Diff line change
@@ -1,38 +1,33 @@
{ config, pkgs, ... }:
{ config, lib, pkgs, ... }:
let
dom_ip = "10.98.2.1";
dom_ip = "10.98.3.2";
vlan_router_ip = "10.98.3.1";
dns_server_ip = "10.98.0.1";
dhcp_iface = "enp1s0f1";
client_range = "10.98.2.2,10.98.2.100";
client_range = "10.98.3.3,10.98.3.100";

sub_image = pkgs.nixos {
imports = [ "${pkgs.path}/nixos/modules/installer/netboot/netboot-minimal.nix" ];

system.stateVersion = "25.05";
services.openssh = {
enable = true;
settings.PasswordAuthentication = true;
settings.KbdInteractiveAuthentication = false;
};
sub_image = lib.nixosSystem {
system = "x86_64-linux";

users.users.papatux = {
isNormalUser = true;
description = "papatux";
extraGroups = [ "networkmanager" "wheel" ];
hashedPassword = "$6$6GnvJWpo8oOWM1tb$GhuldW5iIdS6OuRyq5u1hSSu0VotQCLac7emA.Kui2hWLozR7EIO4Su6PCo5hTRG8iWnAOlGemQVyejIA9l4j/";
openssh.authorizedKeys.keys = import ../../papatux-keys.nix;
};
modules = [
../prospit/configuration.nix
];
};


prospit = sub_image.config.system.build;

ipxe_config = pkgs.writeText "boot.ipxe" ''
#!ipxe
kernel http://${dom_ip}:8080/netboot-nixtest/kernel init=/init boot.shell_on_fail
initrd http://${dom_ip}:8080/netboot-nixtest/initrd
kernel http://${dom_ip}:8080/netboot-kernel/bzImage init=${prospit.toplevel}/init boot.shell_on_fail
initrd http://${dom_ip}:8080/netboot-initrd/initrd

boot
'';

webroot = pkgs.linkFarm "netboot" [
{ name = "netboot-nixtest"; path = sub_image.config.system.build.toplevel; }
{ name = "netboot-kernel"; path = prospit.kernel; }
{ name = "netboot-initrd"; path = prospit.netbootRamdisk; }
{ name = "boot.ipxe"; path = ipxe_config; }
];

Expand All @@ -54,14 +49,18 @@ in

services.dnsmasq = {
enable = true;
settings.domain = "bastille.vtluug.org";
settings.interface = "${dhcp_iface}";
settings.bind-interfaces = true;
settings.server = [ "${dns_server_ip}" ];
settings.enable-tftp = true;
settings.tftp-root = "${tftproot}";
settings.dhcp-range = "${client_range},12h";
settings.dhcp-option = [ "option:router,${dom_ip}" ];
settings.dhcp-option = [ "option:router,${vlan_router_ip}" ];
settings.dhcp-userclass = [ "set:ipxe,iPXE" ];
settings.dhcp-boot = [
"tag:!ipxe,ipxe.efi"
"http://${dom_ip}:8080/boot.ipxe"
"http://${dom_ip}:8080/boot.ipxe"
];
};

Expand All @@ -77,4 +76,4 @@ in
allowedTCPPorts = [ 8080 ];
allowedUDPPorts = [ 67 69 ];
};
}
}