chore: dynamic hosts, builder targets
buildbot/nix-eval Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux.nixos-exodus Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux.nixos-isaiah Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux.nixos-linode Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux.nixos-zeke Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux.nixos-jeremiah Build done.
buildbot/nix-build gitea:greg/nixos#checks.aarch64-linux.nixos-nixos Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux.nixos-gitlab Build done.
buildbot/nix-build Build done.
buildbot/nix-eval Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux.nixos-exodus Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux.nixos-isaiah Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux.nixos-linode Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux.nixos-zeke Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux.nixos-jeremiah Build done.
buildbot/nix-build gitea:greg/nixos#checks.aarch64-linux.nixos-nixos Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux.nixos-gitlab Build done.
buildbot/nix-build Build done.
Make hosts read from directories, to limit manual changes Rename vm-gitlab -> gitlab A few reformatting and lint changes due to altered files Create builder targets for Darwin builders
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot = {
|
||||
binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
supportedFilesystems = [
|
||||
"ntfs"
|
||||
"btrfs"
|
||||
];
|
||||
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;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
metadata,
|
||||
top,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./boot.nix
|
||||
./hardware-configuration.nix
|
||||
# ./virt.nix
|
||||
top.nix-hardware.nixosModules.system76
|
||||
];
|
||||
|
||||
age.secrets = {
|
||||
gitea-workerPassword.file = ../../secrets/gitea/workerPassword.age;
|
||||
};
|
||||
|
||||
boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ];
|
||||
|
||||
greg = {
|
||||
kubernetes = {
|
||||
enable = true;
|
||||
vipInterface = "enp12s0";
|
||||
priority = 253;
|
||||
};
|
||||
remote-builder.enable = true;
|
||||
runner = {
|
||||
enable = true;
|
||||
vbox = true;
|
||||
};
|
||||
tailscale = {
|
||||
enable = true;
|
||||
tags = [ "home" ];
|
||||
};
|
||||
};
|
||||
|
||||
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.enp12s0.useDHCP = true;
|
||||
};
|
||||
|
||||
# Let's do a sound thing
|
||||
services = {
|
||||
k3s = {
|
||||
extraFlags = [
|
||||
"--tls-san ${metadata.hosts.${config.networking.hostName}.ip}"
|
||||
#"--bind-address ${ip}"
|
||||
];
|
||||
};
|
||||
xserver.videoDrivers = [ "nvidia" ];
|
||||
};
|
||||
|
||||
users.users.greg.extraGroups = [
|
||||
"podman"
|
||||
];
|
||||
|
||||
virtualisation.virtualbox.host = {
|
||||
enableExtensionPack = true;
|
||||
headless = true;
|
||||
enableWebService = true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
# 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";
|
||||
};
|
||||
"/mnt/disk1" = {
|
||||
device = "/dev/disk/by-uuid/0bb64e76-8811-499a-b60e-cc97808f2b0e";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
passthru = [
|
||||
"1002:164e" # Raphael - embedded GPU
|
||||
"1002:1640" # Rembrandt - Audio
|
||||
#"10de:2507" # RTX 3050 video
|
||||
#"10de:228e" # RTX 3050 audio
|
||||
];
|
||||
in
|
||||
{
|
||||
# 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;
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user