2024-11-25 13:56:52 -06:00
|
|
|
{
|
2025-04-14 22:58:03 -05:00
|
|
|
config,
|
2024-11-25 13:56:52 -06:00
|
|
|
lib,
|
|
|
|
|
pkgs,
|
|
|
|
|
top,
|
|
|
|
|
...
|
|
|
|
|
}:
|
2023-12-12 16:25:58 -06:00
|
|
|
{
|
2024-10-03 11:26:39 -05:00
|
|
|
imports = [
|
|
|
|
|
./hardware-configuration.nix
|
2024-11-25 13:56:52 -06:00
|
|
|
top.proxmox.nixosModules.proxmox-ve
|
|
|
|
|
];
|
|
|
|
|
|
2025-04-14 22:58:03 -05:00
|
|
|
age.secrets = {
|
|
|
|
|
runner-reg.file = ../../secrets/gitlab/isaiah-podman-runner-reg.age;
|
|
|
|
|
docker-auth.file = ../../secrets/gitlab/docker-auth.age;
|
|
|
|
|
runner-qemu.file = ../../secrets/gitlab/isaiah-qemu-runner-reg.age;
|
|
|
|
|
};
|
|
|
|
|
|
2024-11-25 13:56:52 -06:00
|
|
|
boot = {
|
|
|
|
|
binfmt.emulatedSystems = [ "aarch64-linux" ];
|
|
|
|
|
extraModprobeConfig = "options kvm_amd nested=1";
|
|
|
|
|
kernel.sysctl = {
|
|
|
|
|
"net.bridge.bridge-nf-call-ip6tables" = 0;
|
|
|
|
|
"net.bridge.bridge-nf-call-iptables" = 0;
|
|
|
|
|
"net.bridge.bridge-nf-call-arptables" = 0;
|
|
|
|
|
};
|
|
|
|
|
loader = {
|
|
|
|
|
efi = {
|
|
|
|
|
canTouchEfiVariables = true;
|
|
|
|
|
efiSysMountPoint = "/boot";
|
|
|
|
|
};
|
|
|
|
|
systemd-boot = {
|
|
|
|
|
enable = true;
|
|
|
|
|
configurationLimit = 10;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
supportedFilesystems = [ "ntfs" ];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
2025-04-14 22:58:03 -05:00
|
|
|
curl
|
|
|
|
|
gawk
|
|
|
|
|
git
|
|
|
|
|
unzip
|
|
|
|
|
wget
|
2024-11-25 13:56:52 -06:00
|
|
|
zstd
|
2024-10-03 11:26:39 -05:00
|
|
|
];
|
2023-12-12 16:25:58 -06:00
|
|
|
|
2024-10-18 16:46:35 -05:00
|
|
|
greg = {
|
|
|
|
|
tailscale.enable = true;
|
|
|
|
|
remote-builder.enable = true;
|
|
|
|
|
};
|
2023-12-12 23:22:29 -06:00
|
|
|
|
2024-11-25 13:56:52 -06:00
|
|
|
fileSystems = {
|
|
|
|
|
"/media/proxmox" = {
|
|
|
|
|
device = "10.42.1.4:/volume1/proxmox";
|
|
|
|
|
fsType = "nfs";
|
|
|
|
|
options = [ "noatime" ];
|
2024-11-18 21:11:17 -06:00
|
|
|
};
|
2024-10-03 11:26:39 -05:00
|
|
|
};
|
2024-11-25 13:56:52 -06:00
|
|
|
|
2024-10-03 11:26:39 -05:00
|
|
|
networking = {
|
2024-11-21 23:13:21 -06:00
|
|
|
bridges.br0 = {
|
|
|
|
|
interfaces = [ "enp38s0" ];
|
|
|
|
|
};
|
2024-10-03 11:26:39 -05:00
|
|
|
defaultGateway = {
|
|
|
|
|
address = " 10.42.1.1";
|
2024-11-21 23:13:21 -06:00
|
|
|
interface = "br0";
|
2024-10-03 11:26:39 -05:00
|
|
|
};
|
2025-04-14 22:58:03 -05:00
|
|
|
firewall = {
|
|
|
|
|
enable = true;
|
|
|
|
|
allowedTCPPorts = [ 80 ];
|
|
|
|
|
checkReversePath = lib.mkForce false;
|
|
|
|
|
};
|
|
|
|
|
hostName = "isaiah";
|
2024-10-03 11:26:39 -05:00
|
|
|
interfaces = {
|
2024-11-21 23:13:21 -06:00
|
|
|
br0 = {
|
2024-10-18 16:46:35 -05:00
|
|
|
ipv4.addresses = [
|
|
|
|
|
{
|
|
|
|
|
address = "10.42.1.6";
|
|
|
|
|
prefixLength = 16;
|
|
|
|
|
}
|
|
|
|
|
];
|
2024-10-03 11:26:39 -05:00
|
|
|
};
|
|
|
|
|
};
|
2024-10-18 16:46:35 -05:00
|
|
|
nameservers = [ "10.42.1.5" ];
|
2025-04-14 22:58:03 -05:00
|
|
|
nat = {
|
|
|
|
|
enable = true;
|
|
|
|
|
internalInterfaces = [ "ve-+" ];
|
|
|
|
|
externalInterface = "br0";
|
|
|
|
|
};
|
|
|
|
|
useDHCP = false;
|
2024-10-03 11:26:39 -05:00
|
|
|
};
|
2024-11-25 13:56:52 -06:00
|
|
|
|
|
|
|
|
nixpkgs = {
|
|
|
|
|
config = {
|
|
|
|
|
allowUnfree = true;
|
|
|
|
|
permittedInsecurePackages = [ "nodejs-16.20.2" ];
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
services = {
|
2025-04-14 22:58:03 -05:00
|
|
|
gitlab-runner = {
|
|
|
|
|
enable = true;
|
|
|
|
|
settings = {
|
|
|
|
|
concurrent = 5;
|
|
|
|
|
};
|
|
|
|
|
services = {
|
|
|
|
|
default = {
|
|
|
|
|
executor = "docker";
|
|
|
|
|
authenticationTokenConfigFile = config.age.secrets.runner-reg.path;
|
|
|
|
|
dockerImage = "gitlab.shire-zebra.ts.net:5000/greg/ci-images/fedora:latest";
|
|
|
|
|
dockerAllowedImages = [
|
|
|
|
|
"alpine:*"
|
|
|
|
|
"debian:*"
|
|
|
|
|
"docker:*"
|
|
|
|
|
"fedora:*"
|
|
|
|
|
"python:*"
|
|
|
|
|
"ubuntu:*"
|
|
|
|
|
"registry.gitlab.com/gitlab-org/*"
|
|
|
|
|
"registry.thehellings.com/*/*/*:*"
|
|
|
|
|
"gitlab.shire-zebra.ts.net:5000/*/*/*:*"
|
|
|
|
|
];
|
|
|
|
|
dockerAllowedServices = [
|
|
|
|
|
"docker:*"
|
|
|
|
|
"registry.thehellings.com/*/*/*:*"
|
|
|
|
|
"gitlab.shire-zebra.ts.net:5000/*/*/*:*"
|
|
|
|
|
];
|
|
|
|
|
dockerPrivileged = true;
|
|
|
|
|
dockerVolumes = [
|
|
|
|
|
"/certs/client"
|
|
|
|
|
"/cache"
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
# qemu = {
|
|
|
|
|
# executor = "shell";
|
|
|
|
|
# limit = 5;
|
|
|
|
|
# authenticationTokenConfigFile = config.age.secrets.runner-qemu.path;
|
|
|
|
|
# environmentVariables = {
|
|
|
|
|
# EFI_DIR = "${pkgs.OVMF.fd}/FV/";
|
|
|
|
|
# STORAGE_URL = "s3.thehellings.lan:9000";
|
|
|
|
|
# };
|
|
|
|
|
# };
|
|
|
|
|
};
|
|
|
|
|
};
|
2024-11-25 13:56:52 -06:00
|
|
|
openssh = {
|
|
|
|
|
enable = true;
|
|
|
|
|
settings.PermitRootLogin = "yes";
|
|
|
|
|
};
|
2025-04-14 22:58:03 -05:00
|
|
|
proxmox-ve = {
|
|
|
|
|
enable = true;
|
|
|
|
|
ipAddress = (builtins.elemAt config.networking.interfaces.br0.ipv4.addresses 0).address;
|
|
|
|
|
};
|
2024-11-25 13:56:52 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
system.stateVersion = lib.mkForce "24.05";
|
|
|
|
|
|
2025-04-14 22:58:03 -05:00
|
|
|
systemd.services.gitlab-runner = {
|
|
|
|
|
after = [ "network-online.target" ];
|
|
|
|
|
requires = [ "network-online.target" ];
|
|
|
|
|
};
|
|
|
|
|
|
2024-10-03 11:26:39 -05:00
|
|
|
users = {
|
|
|
|
|
users = {
|
|
|
|
|
greg = {
|
|
|
|
|
extraGroups = [
|
|
|
|
|
"kvm"
|
2024-11-18 21:11:17 -06:00
|
|
|
"libvirtd"
|
2024-10-03 11:26:39 -05:00
|
|
|
"sudo"
|
|
|
|
|
"wheel"
|
|
|
|
|
];
|
|
|
|
|
isNormalUser = true;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
2024-11-25 13:56:52 -06:00
|
|
|
|
2025-04-14 22:58:03 -05:00
|
|
|
virtualisation = {
|
|
|
|
|
podman.enable = true;
|
|
|
|
|
libvirtd = {
|
|
|
|
|
enable = true;
|
|
|
|
|
allowedBridges = [
|
|
|
|
|
"br0"
|
|
|
|
|
"virbr0"
|
|
|
|
|
];
|
|
|
|
|
onBoot = "ignore"; # only restart VMs labeled 'autostart'
|
|
|
|
|
qemu.ovmf.enable = true;
|
|
|
|
|
};
|
|
|
|
|
oci-containers.backend = "podman";
|
2024-10-03 11:26:39 -05:00
|
|
|
};
|
2023-12-12 16:25:58 -06:00
|
|
|
}
|