Files
nixos/hosts/jeremiah/default.nix
T

149 lines
3.2 KiB
Nix
Raw Normal View History

2024-04-16 08:34:06 -05:00
# Edit this configuration file to define what should be installed on
2024-05-06 13:30:36 -05:00
# your system. Help is available in the configuration.nix(5) man page
2024-04-16 08:34:06 -05:00
# and in the NixOS manual (accessible by running nixos-help).
2024-10-19 01:19:59 -05:00
{
config,
pkgs,
lib,
2025-04-13 21:04:59 -05:00
top,
2024-10-19 01:19:59 -05:00
...
}:
2024-04-16 08:34:06 -05:00
2025-04-17 22:15:01 -05:00
let
passthru = [ ];
in
2024-04-16 08:34:06 -05:00
{
2024-10-19 01:19:59 -05:00
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
2025-04-13 21:04:59 -05:00
top.proxmox.nixosModules.proxmox-ve
2024-10-19 01:19:59 -05:00
];
2024-04-16 08:34:06 -05:00
# Bootloader.
2025-04-17 22:15:01 -05:00
boot = {
initrd.kernelModules = [
"vfio_pci"
"vfio"
"vfio_iommu_type1"
];
kernelParams = [
"amd_iommu=on"
"iommu=pt"
("vfio-pci.ids=" + (lib.concatStringsSep "," passthru))
];
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
2024-11-20 22:53:37 -06:00
};
environment.systemPackages = with pkgs; [
curl
gawk
git
unzip
wget
];
2024-06-21 13:02:13 -05:00
fileSystems = {
"/nix" = {
fsType = "btrfs";
options = [ "subvol=nix" ];
device = "/dev/nvme0n1p1";
};
"/var" = {
fsType = "btrfs";
options = [ "subvol=var" ];
device = "/dev/nvme0n1p1";
};
2025-04-17 16:52:11 -05:00
"/var/pve" = {
fsType = "btrfs";
options = [ "subvol=pve" ];
device = "/dev/nvme0n1p1";
};
"/btrfs" = {
fsType = "btrfs";
device = "/dev/nvme0n1p1";
};
2025-04-13 21:04:59 -05:00
"/media/proxmox" = {
device = "10.42.1.4:/volume1/proxmox";
fsType = "nfs";
options = [ "noatime" ];
};
};
2024-06-21 13:02:13 -05:00
2025-01-16 15:20:25 -06:00
greg = {
home = true;
tailscale.enable = true;
remote-builder.enable = true;
};
networking = {
hostName = "jeremiah"; # Define your hostname.
useDHCP = false;
2025-04-13 21:04:59 -05:00
bridges.br0 = {
interfaces = [ "enp68s0" ];
};
2025-01-16 15:20:25 -06:00
defaultGateway = {
address = " 10.42.1.2";
2025-04-13 21:04:59 -05:00
interface = "br0";
2025-01-16 15:20:25 -06:00
};
interfaces = {
2025-04-13 21:04:59 -05:00
br0 = {
2025-01-16 15:20:25 -06:00
ipv4.addresses = [
{
address = "10.42.1.8";
prefixLength = 16;
}
];
};
};
nameservers = [ "10.42.1.5" ];
};
#####################################################################################
#################### Virtualbox Runner ##############################################
#####################################################################################
2025-01-16 15:20:25 -06:00
age.secrets.runner-reg.file = ../../secrets/gitlab/jeremiah-runner-reg.age;
services = {
gitlab-runner = {
2025-04-14 22:20:56 -05:00
enable = true;
2025-01-28 21:27:29 -06:00
settings.concurrent = 7;
services = {
shell = {
executor = "shell";
2025-01-28 21:27:29 -06:00
limit = 7;
authenticationTokenConfigFile = config.age.secrets.runner-reg.path;
environmentVariables = {
EFI_DIR = "${pkgs.OVMF.fd}/FV/";
2024-12-24 11:19:14 -06:00
STORAGE_URL = "s3.thehellings.lan:9000";
};
};
};
};
2025-04-13 23:05:11 -05:00
proxmox-ve = {
enable = true;
ipAddress = (builtins.elemAt config.networking.interfaces.br0.ipv4.addresses 0).address;
};
};
systemd.services."gitlab-runner" = {
after = [
"network.target"
"network-online.target"
2024-11-18 20:38:15 -06:00
"tailscaled.service"
];
2024-11-18 20:38:15 -06:00
requires = [
"network-online.target"
2024-11-18 20:38:15 -06:00
"tailscaled.service"
];
serviceConfig = {
DevicePolicy = lib.mkForce "auto";
User = "root";
DynamicUser = lib.mkForce false;
};
};
2024-04-16 08:34:06 -05:00
}