Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
24 changes: 12 additions & 12 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 18 additions & 16 deletions hosts/bastille/blade-names.nix
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# keep-sorted start
[
"backbiter"
"damocles"
"durendal"
"eyelander"
"excalibur"
"gram"
"gryffindor"
"kusanagi"
"narsil"
"oathbringer"
"riptide"
"sting"
]
# keep-sorted end
{
# TODO: prospit's a special case and won't remain here forever
"d8:9e:f3:3e:f9:41" = "prospit";

"40:f2:e9:c6:65:5f" = "backbiter";
"40:f2:e9:c6:69:43" = "damocles";
"40:f2:e9:c6:69:67" = "durendal";
"40:f2:e9:c6:74:59" = "eyelander";
"40:f2:e9:c6:75:f1" = "excalibur";
"40:f2:e9:c6:76:21" = "gram";

"unassigned-0" = "gryffindor";
"unassigned-1" = "kusanagi";
"unassigned-2" = "narsil";
"unassigned-3" = "oathbringer";
"unassigned-4" = "riptide";
"unassigned-5" = "sting";
}
23 changes: 23 additions & 0 deletions hosts/bastille/blade.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{ modulesPath, pkgs, lib, ... }: {
imports = [
./eno1-imm-disable.nix
(import ../common/k3s.nix {})
../common/nix.nix
../common/sshd.nix
../common/users-local.nix
(modulesPath + "/installer/netboot/netboot-minimal.nix")
];

# Get hostname from DHCP request
networking.hostName = "";

# when making the ISO, the initialHashedPassword is set to "" for some reason
# we already set a hashed password, so null this
users.users.root.initialHashedPassword = lib.mkForce null;

environment.systemPackages = [
pkgs.fastfetch
];

system.stateVersion = "25.11";
}
30 changes: 30 additions & 0 deletions hosts/bastille/eno1-imm-disable.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{ pkgs, lib, ... }:
let
eno1-imm-disable = pkgs.writeShellApplication {
name = "eno1-imm-disable";

runtimeInputs = [
pkgs.iproute2
];

text = ''
if grep "Lenovo NeXtScale nx360 M5" /sys/devices/virtual/dmi/id/product_name; then
ip link set down eno1
fi
'';
};
in {
systemd.services."eno1-imm-disable" = {
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];

unitConfig = {
Description = "Disable eno1 on Lenovo NeXtScale nodes to avoid issues with using the imm interface";
};

serviceConfig = {
Type = "oneshot";
ExecStart = "${lib.getExe eno1-imm-disable}";
};
};
}
17 changes: 17 additions & 0 deletions hosts/common/k3s.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{ role ? "agent", clusterInit ? false }: {
networking.firewall.allowedTCPPorts = [
6443
];

networking.firewall.allowedUDPPorts = [
8472
];

services.k3s = {
inherit role clusterInit;

enable = true;
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.3.2:6443";
};
}
20 changes: 20 additions & 0 deletions hosts/common/nfs.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{ config, pkgs, ... }:
let
mkNfs = {path, options ? [ "vers=4.0" "soft" "nodev" "nosuid" ]}: {
device = "${path}";
fsType = "nfs";
inherit options;
};
in
{
environment.systemPackages = [ pkgs.nfs-utils ];

fileSystems."/nfs/cistern/share" = mkNfs {path = "10.98.0.7:/cistern/nfs/share";};
fileSystems."/nfs/cistern/files" = mkNfs {path = "10.98.0.7:/cistern/nfs/files";};
fileSystems."/nfs/cistern/home" = mkNfs {
path = "10.98.0.7:/cistern/nfs/home";
options = [ "vers=4.0" "soft" "nodev" "nosuid" ];
};
fileSystems."/nfs/cistern/libvirt" = mkNfs {path = "10.98.0.7:/cistern/nfs/libvirt";};
fileSystems."/nfs/cistern/docker/data" = mkNfs {path = "10.98.0.7:/cistern/nfs/docker/data";};
}
10 changes: 10 additions & 0 deletions hosts/vesuvius/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,13 @@ Giant storage server + future LHCPISCSIPXEIDK thing maybe?
## Storage
We currently have one (manually created) RAID-Z2 pool mounted at `/forge` with `8` drives of `12 Tb` each.
We have capacity for `48`(!) drives, but still only paper (and tape) caddies.

```
# for the nix store
zfs create -o mountpoint=legacy \
-o compression=zstd \
-o xattr=sa \
-o acltype=posixacl \
-o atime=off \
forge/nix
```
40 changes: 7 additions & 33 deletions hosts/vesuvius/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@
{
imports = [
./hardware-configuration.nix
(import ../common/k3s.nix { role = "server"; clusterInit = true; })
./nix.nix
./zfs.nix
./ipa.nix
./netboot.nix

../common/nfs.nix
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we mount Dirtycow on Vesuvius? We're planning to migrate most things onto Bastille and Dirtycow will be moved to McBryde so the latency might not be very good. Also in that migration, the IP will change too (probably should use IPv6 addresses too so we're 21st century compliant. Dirtycow's shares are already setup for our IPv6 subnet).

Copy link
Member

Choose a reason for hiding this comment

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

it's so ipa users (which you should use!!!!!) have homedirs. also: why not?
when the IP changes we can change the config.

Copy link
Member

Choose a reason for hiding this comment

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

We can mount Dirtycow for now. Since Acidburn will be moved to the cluster, the homedirs (and other things) need to be migrated to Vesuvius.

../common/tz-locale.nix
../common/users-local.nix
../common/sshd.nix
];

boot.loader.systemd-boot.enable = true;
Expand All @@ -15,44 +22,11 @@
networking.networkmanager.enable = true;
networking.networkmanager.unmanaged = [ "interface-name:enp1s0f1" ];

time.timeZone = "America/New_York";

i18n.defaultLocale = "en_US.UTF-8";

i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};

users.users.papatux = {
isNormalUser = true;
description = "papatux";
extraGroups = [ "networkmanager" "wheel" ];
openssh.authorizedKeys.keys = import ../../papatux-keys.nix;
};

security.sudo.wheelNeedsPassword = false;

nixpkgs.config.allowUnfree = true;

environment.systemPackages = with pkgs; [
neovim
];

services.openssh.enable = true;

# 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. It‘s 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 = "25.05"; # Did you read the comment?
}
22 changes: 20 additions & 2 deletions hosts/vesuvius/ipa.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# TODO: /etc/krb5.keytab missing, maybe agenix
{ config, pkgs, ... }:
{
age.secrets."krb5.keytab".file = ../../secrets/krb5.keytab.age;

age.secrets."krb5.keytab" = {
file = ../../secrets/keytabs/vesuvius.keytab.age;
path = "/etc/krb5.keytab";
owner = "root";
group = "root";
mode = "0600";
};
environment.variables.KRB5_KTNAME = config.age.secrets."krb5.keytab".path;

networking.domain = "vtluug.org";

security.ipa = {
enable = true;

Expand All @@ -19,4 +26,15 @@
sha256 = "16wv6kfvnm0hcyzr0wjrgmymw3asm84m8r1wbfq09qvqrjycfc6s";
};
};
security.sudo.extraRules = [
{
groups = [ "sudoers" ];
commands = [
{
command = "ALL";
options = [ "SETENV" ];
}
];
}
];
}
Loading