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-06-21 13:02:13 -05:00
|
|
|
|
{ config, pkgs, lib, ... }:
|
2024-04-16 08:34:06 -05:00
|
|
|
|
|
|
|
|
|
|
{
|
2024-05-06 13:30:36 -05:00
|
|
|
|
imports =
|
|
|
|
|
|
[ # Include the results of the hardware scan.
|
2024-05-07 10:13:51 -05:00
|
|
|
|
./ceph.nix
|
2024-05-06 13:30:36 -05:00
|
|
|
|
./hardware-configuration.nix
|
2024-06-20 22:02:57 -05:00
|
|
|
|
./minio.nix
|
2024-05-06 13:30:36 -05:00
|
|
|
|
];
|
2024-04-16 08:34:06 -05:00
|
|
|
|
|
2024-05-06 13:30:36 -05:00
|
|
|
|
# Bootloader.
|
|
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
2024-04-16 08:34:06 -05:00
|
|
|
|
|
2024-05-06 14:06:06 -05:00
|
|
|
|
networking = {
|
|
|
|
|
|
hostName = "jeremiah"; # Define your hostname.
|
|
|
|
|
|
useDHCP = false;
|
|
|
|
|
|
defaultGateway = {
|
|
|
|
|
|
address = " 10.42.1.1";
|
|
|
|
|
|
interface = "enp68s0";
|
|
|
|
|
|
};
|
2024-07-12 22:07:03 -05:00
|
|
|
|
vlans = {
|
|
|
|
|
|
san = {
|
|
|
|
|
|
id = 616;
|
|
|
|
|
|
interface = "enp67s0";
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
2024-05-06 14:06:06 -05:00
|
|
|
|
interfaces = {
|
|
|
|
|
|
enp68s0 = {
|
|
|
|
|
|
ipv4.addresses = [ {
|
|
|
|
|
|
address = "10.42.1.8";
|
|
|
|
|
|
prefixLength = 16;
|
|
|
|
|
|
} {
|
|
|
|
|
|
address = "10.42.100.1";
|
|
|
|
|
|
prefixLength = 16;
|
|
|
|
|
|
} ];
|
|
|
|
|
|
};
|
2024-07-12 22:07:03 -05:00
|
|
|
|
san = {
|
2024-05-06 14:06:06 -05:00
|
|
|
|
ipv4.addresses = [ {
|
|
|
|
|
|
address = "10.201.1.2";
|
2024-06-20 22:02:57 -05:00
|
|
|
|
prefixLength = 24;
|
2024-05-06 14:06:06 -05:00
|
|
|
|
} ];
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
|
|
|
|
|
nameservers = [
|
|
|
|
|
|
"10.42.1.5"
|
|
|
|
|
|
];
|
|
|
|
|
|
};
|
2024-05-06 13:30:36 -05:00
|
|
|
|
greg = {
|
2024-08-16 22:46:05 -05:00
|
|
|
|
home = true;
|
2024-05-06 13:30:36 -05:00
|
|
|
|
tailscale.enable = true;
|
|
|
|
|
|
};
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
2024-06-21 13:02:13 -05:00
|
|
|
|
curl
|
|
|
|
|
|
gawk
|
|
|
|
|
|
git
|
|
|
|
|
|
unzip
|
|
|
|
|
|
wget
|
2024-05-06 13:30:36 -05:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
fileSystems = {
|
|
|
|
|
|
"/nix" = {
|
|
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
|
options = [ "subvol=nix" ];
|
|
|
|
|
|
device = "/dev/nvme0n1p1";
|
|
|
|
|
|
};
|
|
|
|
|
|
"/var" = {
|
|
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
|
options = [ "subvol=var" ];
|
|
|
|
|
|
device = "/dev/nvme0n1p1";
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
2024-06-21 13:02:13 -05:00
|
|
|
|
|
|
|
|
|
|
#####################################################################################
|
|
|
|
|
|
#################### Virtualbox Runner ##############################################
|
|
|
|
|
|
#####################################################################################
|
|
|
|
|
|
services = {
|
|
|
|
|
|
gitlab-runner = {
|
|
|
|
|
|
enable = true;
|
2024-07-12 23:00:01 -05:00
|
|
|
|
settings.concurrent = 7;
|
2024-06-21 13:02:13 -05:00
|
|
|
|
services = {
|
|
|
|
|
|
shell = {
|
|
|
|
|
|
executor = "shell";
|
|
|
|
|
|
limit = 5;
|
2024-10-03 11:16:06 -05:00
|
|
|
|
authenticationTokenConfigFile = config.age.secrets.runner-reg.path;
|
2024-06-21 13:02:13 -05:00
|
|
|
|
environmentVariables = {
|
|
|
|
|
|
EFI_DIR = "${pkgs.OVMF.fd}/FV/";
|
2024-08-16 22:46:05 -05:00
|
|
|
|
STORAGE_URL = "http://s3.thehellings.lan:9000";
|
2024-06-21 13:02:13 -05:00
|
|
|
|
};
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
|
|
|
|
|
age.secrets.runner-reg.file = ../../secrets/gitlab/jeremiah-runner-reg.age;
|
|
|
|
|
|
virtualisation.virtualbox.host = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
enableExtensionPack = true;
|
|
|
|
|
|
enableHardening = false;
|
|
|
|
|
|
headless = true;
|
2024-07-23 14:27:03 -05:00
|
|
|
|
enableWebService = true;
|
2024-06-21 13:02:13 -05:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
systemd.services."gitlab-runner" = {
|
|
|
|
|
|
after = [
|
|
|
|
|
|
"network.target"
|
|
|
|
|
|
"network-online.target"
|
|
|
|
|
|
"systemd-resolved.service"
|
|
|
|
|
|
];
|
|
|
|
|
|
wants = [
|
|
|
|
|
|
"network-online.target"
|
|
|
|
|
|
"systemd-resolved.service"
|
|
|
|
|
|
];
|
|
|
|
|
|
preStart = builtins.concatStringsSep "\n" [
|
|
|
|
|
|
"${pkgs.kmod}/bin/modprobe vboxdrv"
|
|
|
|
|
|
"${pkgs.kmod}/bin/modprobe vboxnetadp"
|
|
|
|
|
|
"${pkgs.kmod}/bin/modprobe vboxnetflt"
|
|
|
|
|
|
];
|
|
|
|
|
|
postStop = "${pkgs.kmod}/bin/rmmod vboxnetadp vboxnetflt vboxdrv";
|
|
|
|
|
|
serviceConfig = {
|
|
|
|
|
|
DevicePolicy = lib.mkForce "auto";
|
|
|
|
|
|
User = "root";
|
|
|
|
|
|
DynamicUser = lib.mkForce false;
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
2024-04-16 08:34:06 -05:00
|
|
|
|
}
|