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
|
|
|
|
|
|
|
|
|
|
{
|
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
|
|
|
|
|
2024-10-03 11:26:39 -05:00
|
|
|
|
# Bootloader.
|
2025-04-17 22:15:01 -05:00
|
|
|
|
boot = {
|
|
|
|
|
|
initrd.kernelModules = [
|
2025-11-08 13:59:34 -06:00
|
|
|
|
"amdgpu"
|
2025-04-17 22:15:01 -05:00
|
|
|
|
];
|
2025-12-02 21:30:38 -06:00
|
|
|
|
kernelParams =
|
|
|
|
|
|
[
|
|
|
|
|
|
];
|
2025-04-17 22:15:01 -05:00
|
|
|
|
loader = {
|
|
|
|
|
|
systemd-boot.enable = true;
|
|
|
|
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
|
|
};
|
2024-11-20 22:53:37 -06:00
|
|
|
|
};
|
|
|
|
|
|
|
2024-10-03 11:26:39 -05:00
|
|
|
|
environment.systemPackages = with pkgs; [
|
2025-11-08 13:59:34 -06:00
|
|
|
|
amdgpu_top
|
|
|
|
|
|
clinfo
|
2024-10-03 11:26:39 -05:00
|
|
|
|
curl
|
|
|
|
|
|
gawk
|
|
|
|
|
|
git
|
2025-11-08 16:11:37 -06:00
|
|
|
|
mesa-demos
|
2024-10-03 11:26:39 -05:00
|
|
|
|
unzip
|
|
|
|
|
|
wget
|
|
|
|
|
|
];
|
2024-06-21 13:02:13 -05:00
|
|
|
|
|
2024-10-03 11:26:39 -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-10-03 11:26:39 -05:00
|
|
|
|
};
|
2024-06-21 13:02:13 -05:00
|
|
|
|
|
2025-01-16 15:20:25 -06:00
|
|
|
|
greg = {
|
|
|
|
|
|
home = true;
|
2025-07-02 23:07:08 -05:00
|
|
|
|
kubernetes = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
vipInterface = "br0";
|
2025-12-02 21:30:38 -06:00
|
|
|
|
vip = "10.42.1.8";
|
2025-07-02 23:07:08 -05:00
|
|
|
|
priority = 254;
|
|
|
|
|
|
};
|
2025-11-15 14:08:34 -06:00
|
|
|
|
tailscale = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
tags = [ "home" ];
|
|
|
|
|
|
};
|
2025-01-16 15:20:25 -06:00
|
|
|
|
remote-builder.enable = true;
|
2025-07-29 23:13:10 -05:00
|
|
|
|
runner = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
threads = 3;
|
2025-11-02 22:33:05 -06:00
|
|
|
|
qemu = true;
|
2025-07-29 23:13:10 -05:00
|
|
|
|
};
|
2025-01-16 15:20:25 -06:00
|
|
|
|
};
|
|
|
|
|
|
|
2025-11-08 13:59:34 -06:00
|
|
|
|
hardware.graphics = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
enable32Bit = true;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2025-01-16 15:20:25 -06:00
|
|
|
|
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
|
|
|
|
};
|
2025-11-08 13:59:34 -06:00
|
|
|
|
firewall.allowedTCPPorts = [ 3389 ];
|
2025-12-02 21:30:38 -06:00
|
|
|
|
interfaces.br0.useDHCP = true;
|
2025-01-16 15:20:25 -06:00
|
|
|
|
};
|
|
|
|
|
|
|
2025-11-08 13:59:34 -06:00
|
|
|
|
programs.steam = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
protontricks.enable = true;
|
|
|
|
|
|
};
|
2024-10-03 11:26:39 -05:00
|
|
|
|
#####################################################################################
|
|
|
|
|
|
#################### Virtualbox Runner ##############################################
|
|
|
|
|
|
#####################################################################################
|
2025-05-20 22:27:28 -05:00
|
|
|
|
age.secrets.runner-reg.file = ../../secrets/gitlab/nixos-qemu-shell.age;
|
2025-01-16 15:20:25 -06:00
|
|
|
|
|
2024-10-03 11:26:39 -05:00
|
|
|
|
services = {
|
2025-11-08 13:59:34 -06:00
|
|
|
|
displayManager = {
|
|
|
|
|
|
defaultSession = "xfce";
|
|
|
|
|
|
autoLogin = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
user = "greg";
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
2025-04-13 23:05:11 -05:00
|
|
|
|
proxmox-ve = {
|
|
|
|
|
|
enable = true;
|
2025-12-03 19:14:05 -06:00
|
|
|
|
ipAddress = "10.42.1.8";
|
2025-04-13 23:05:11 -05:00
|
|
|
|
};
|
2025-11-08 13:59:34 -06:00
|
|
|
|
sunshine = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
autoStart = true;
|
|
|
|
|
|
#capSysAdmin = true;
|
|
|
|
|
|
openFirewall = true;
|
|
|
|
|
|
};
|
|
|
|
|
|
xserver = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
desktopManager = {
|
|
|
|
|
|
xterm.enable = true;
|
|
|
|
|
|
xfce.enable = true;
|
|
|
|
|
|
};
|
2024-10-03 11:26:39 -05:00
|
|
|
|
};
|
|
|
|
|
|
};
|
2025-11-08 13:59:34 -06:00
|
|
|
|
|
|
|
|
|
|
systemd = {
|
|
|
|
|
|
services = {
|
|
|
|
|
|
"gitlab-runner" = {
|
|
|
|
|
|
after = [
|
|
|
|
|
|
"network.target"
|
|
|
|
|
|
"network-online.target"
|
|
|
|
|
|
"tailscaled.service"
|
|
|
|
|
|
];
|
|
|
|
|
|
requires = [
|
|
|
|
|
|
"network-online.target"
|
|
|
|
|
|
"tailscaled.service"
|
|
|
|
|
|
];
|
|
|
|
|
|
serviceConfig = {
|
|
|
|
|
|
DevicePolicy = lib.mkForce "auto";
|
|
|
|
|
|
User = "root";
|
|
|
|
|
|
DynamicUser = lib.mkForce false;
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
|
|
|
|
|
targets = {
|
|
|
|
|
|
sleep.enable = false;
|
|
|
|
|
|
suspend.enable = false;
|
|
|
|
|
|
hibernate.enable = false;
|
|
|
|
|
|
hybrid-sleep.enable = false;
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
users.extraGroups.video.members = [ "greg" ];
|
2024-04-16 08:34:06 -05:00
|
|
|
|
}
|