Rename of Jude to Zeke

Since Jude is a now a server, we rename it to Zeke, for Ezekiel
Update of tailscale to auto-register nodes
Update kubernetes to install the etcd application
Update Zeke IP address and DNS bindings
This commit is contained in:
Greg Hellings
2025-07-02 12:01:27 -05:00
parent f1f38d85ec
commit f9f1357b8e
17 changed files with 147 additions and 202 deletions
+55
View File
@@ -0,0 +1,55 @@
{ lib, pkgs, ... }:
{
# Use the systemd-boot EFI boot loader.
boot = {
binfmt.emulatedSystems = [ "aarch64-linux" ];
kernelPackages = pkgs.linuxPackages_latest;
supportedFilesystems = [ "ntfs" ];
loader = {
timeout = 15;
systemd-boot = {
enable = true;
configurationLimit = 20;
extraEntries = {
"Windows.conf" = (
lib.strings.concatStringsSep "\n" [
"title Windows"
"efi /EFI/Microsoft/EFI/bootmgfw.efi"
]
);
"Win2.conf" = (
lib.strings.concatStringsSep "\n" [
"title Windows 11"
"efi /shellx64.efi"
"options -nointerrupt -noconsolein -noconsoleout windows11.nsh"
]
);
"Shell.conf" = (
lib.strings.concatStringsSep "\n" [
"title EFI Shell"
"efi /shell.efi"
]
);
};
extraFiles = {
"windows11.nsh" = (pkgs.writeText "windows11.nsh" (lib.strings.concatStringsSep "\n" [ ]));
"shell.efi" = "${pkgs.edk2-uefi-shell}/shell.efi";
};
};
grub = {
enable = false;
device = "/dev/nvme0n1";
useOSProber = true;
efiSupport = true;
extraEntries = ''
menuentry "Windows" --class windows --class os {
insmod ntfs
chainloader (hd0,0)/EFI/Windows/bootmgfw.efi
}
'';
};
#efi.canTouchEfiVariables = true;
};
};
}
+84
View File
@@ -0,0 +1,84 @@
{
config,
lib,
top,
...
}:
{
imports = [
./boot.nix
./hardware-configuration.nix
./virt.nix
top.nix-hardware.nixosModules.system76
];
boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ];
greg = {
tailscale.enable = true;
kubernetes.enable = true;
remote-builder.enable = true;
};
hardware = {
nvidia = {
modesetting.enable = true;
powerManagement = {
enable = false;
finegrained = false;
};
nvidiaSettings = true;
open = true;
};
system76 = {
firmware-daemon.enable = true;
#kernel-modules.enable = true;
};
};
networking = {
hostName = "zeke";
networkmanager.enable = lib.mkForce true;
enableIPv6 = false;
useDHCP = false;
interfaces = {
# This seems to be direct mother board interface
enp12s0.useDHCP = true;
enp12s0.ipv4.addresses = [
{
address = "10.42.1.13";
prefixLength = 16;
}
];
};
defaultGateway = {
address = "10.42.1.1";
interface = "enp12s0";
};
nameservers = [
"10.42.1.5"
"10.42.1.1"
];
};
# Let's do a sound thing
services = {
k3s = {
extraFlags =
let
ip = (builtins.head config.networking.interfaces.enp12s0.ipv4.addresses).address;
in
[
"--tls-san ${ip}"
#"--bind-address ${ip}"
];
};
xserver.videoDrivers = [ "nvidia" ];
};
users.users.greg.extraGroups = [
"kvm"
"podman"
];
}
+45
View File
@@ -0,0 +1,45 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
config,
lib,
modulesPath,
...
}:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems = {
"/" = {
#device = "/dev/disk/by-uuid/27ae91ed-32e9-411e-8227-0d99e360fbbf";
device = "/dev/nvme0n1p4";
fsType = "btrfs";
};
"/boot" = {
device = "/dev/nvme0n1p1";
fsType = "auto";
};
"/windows11" = {
device = "/dev/nvme1n1p2";
fsType = "ntfs-3g";
};
};
swapDevices = [ ];
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
+116
View File
@@ -0,0 +1,116 @@
{
config,
lib,
pkgs,
...
}:
let
environmentVariables = {
EFI_DIR = "${pkgs.OVMF.fd}/FV/";
STORAGE_URL = "s3.thehellings.lan:9000";
};
passthru = [
"1002:164e" # Raphael - embedded GPU
"1002:1640" # Rembrandt - Audio
#"10de:2507" # RTX 3050 video
#"10de:228e" # RTX 3050 audio
];
in
{
specialisation = {
vbox.configuration = {
users.extraGroups.vboxusers.members = [ "greg" ];
virtualisation = {
virtualbox.host = {
enable = true;
enableExtensionPack = true;
};
};
services.gitlab-runner.services = lib.mkForce {
vbox = {
inherit environmentVariables;
authenticationTokenConfigFile = config.age.secrets.vbox.path;
executor = "shell";
limit = 5;
};
};
systemd.services.gitlab-runner = {
serviceConfig = {
DevicePolicy = lib.mkForce "auto";
User = "root";
DynamicUser = lib.mkForce false;
};
};
};
};
age.secrets = {
qemu.file = ../../secrets/gitlab/nixos-qemu-shell.age;
vbox.file = ../../secrets/gitlab/nixos-vbox-shell.age;
};
# These options enable sharing of the GPU with the VM
boot = {
# Order matters here, to prevent the AMD driver from getting to the driver before
# vfio-pci does
initrd.kernelModules = [
"vfio_pci"
"vfio"
"vfio_iommu_type1"
#"amdgpu"
#"nvidia"
#"nvidia_modeset"
#"nvidia_uvm"
#"nvidia_drm"
];
kernelParams = [
"amd_iommu=on"
"iommu=pt"
("vfio-pci.ids=" + (lib.concatStringsSep "," passthru))
];
};
hardware.graphics.enable = true;
services.gitlab-runner = {
enable = true;
settings.concurrent = 5;
services.qemu = {
inherit environmentVariables;
executor = "shell";
limit = 5;
authenticationTokenConfigFile = config.age.secrets.qemu.path;
};
};
systemd.services = {
"libvirt-nosleep@" = {
description = "Prevent sleep while %i is running";
serviceConfig = {
Type = "simple";
ExecStart = ''
${pkgs.systemd}/bin/systemd-inhibit --what=sleep --why="Libvirt domain %i is running" --who=%U --mode=block sleep infinity
'';
};
};
};
virtualisation = {
libvirtd = {
extraConfig = ''
log_filters="1:qemu"
log_outputs="1:file:/var/log/libvirt/libvirtd.log"
'';
hooks.qemu = {
win10 = lib.getExe pkgs.qemu-hook;
};
};
spiceUSBRedirection.enable = true;
};
}