Update all hosts to better formatting

This commit is contained in:
Bun 2025-04-17 10:51:55 -04:00
parent 531176d415
commit c2ae238ae3
31 changed files with 227 additions and 233 deletions

View file

@ -5,12 +5,19 @@
"/persist/storage" = {
device = "/dev/disk/by-uuid/135281e2-72ec-4c00-91e8-9897a32c02ce";
fsType = "btrfs";
options = [ "nosuid" "nodev" "nofail" "x-gvfs-show" ];
options = [
"nofail"
"nosuid"
];
};
"/persist/home/${config.sysusers.main}/.local/share/Steam" = {
device = "/dev/disk/by-uuid/135281e2-72ec-4c00-91e8-9897a32c02ce";
fsType = "btrfs";
options = [ "subvol=Steam" "nosuid" "nodev" "nofail" "x-gvfs-show" ];
options = [
"nofail"
"nosuid"
"subvol=Steam"
];
};
};
}

View file

@ -2,8 +2,13 @@
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "xhci_pci" "sr_mod" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.initrd = {
availableKernelModules = [
"xhci_pci"
"sr_mod"
];
kernelModules = [ "dm-snapshot" ];
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

View file

@ -1,13 +1,32 @@
{ config, ... }:
{
fileSystems."/home/${config.sysusers.main}/Network/Midas" = {
device = "11.0.0.1:/";
fsType = "nfs4";
options = [ "x-systemd.automount" "noauto" "soft" "_netdev" ];
};
fileSystems."/home/${config.sysusers.main}/Network/Kitty" = {
device = "10.2.0.1:/";
fsType = "nfs4";
options = [ "x-systemd.automount" "noauto" "soft" "_netdev" ];
fileSystems = {
"/home/${config.sysusers.main}/Network/Midas" = {
device = "10.2.0.1:/storage";
fsType = "nfs4";
options = [
"noauto"
"soft"
"x-systemd.automount"
];
};
"/home/${config.sysusers.main}/Network/Kitty" = {
device = "10.2.0.2:/storage/bun";
fsType = "nfs4";
options = [
"noauto"
"soft"
"x-systemd.automount"
];
"/home/${config.sysusers.main}/Network/Prophet" = {
device = "mx.nixfox.ca:/storage";
fsType = "nfs4";
options = [
"noauto"
"soft"
"x-systemd.automount"
];
};
};
};
}

View file

@ -2,9 +2,19 @@
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-intel" ];
boot = {
initrd = {
availableKernelModules = [
"xhci_pci"
"ehci_pci"
"ahci"
"sd_mod"
"rtsx_pci_sdmmc"
];
kernelModules = [ "dm-snapshot" ];
};
kernelModules = [ "kvm-intel" ];
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

View file

@ -4,12 +4,19 @@
"/persist/storage" = {
device = "/dev/disk/by-uuid/edd3e293-1aff-4fc0-96fa-4e17d6cccfca";
fsType = "btrfs";
options = [ "nosuid" "nodev" "nofail" "x-gvfs-show" ];
options = [
"nofail"
"nosuid"
];
};
"/home/${config.sysusers.main}/Network/Midas" = {
device = "11.0.0.1:/storage";
fsType = "nfs4";
options = [ "x-systemd.automount" "noauto" "soft" "_netdev" ];
options = [
"x-systemd.automount"
"noauto"
"soft"
];
};
};
}

View file

@ -1,8 +1,13 @@
{ config, lib, ... }:
{
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "usbhid" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-intel" ];
boot.initrd = {
availableKernelModules = [
"ahci"
"ehci_pci"
"xhci_pci"
];
kernelModules = [ "dm-snapshot" ];
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

View file

@ -1,6 +1,15 @@
{ ... }:
{
networking = {
interfaces."eno1".ipv4.addresses = [{
address = "10.2.0.2";
prefixLength = 8;
}];
defaultGateway = {
address = "10.1.0.1";
interface = "eno1";
};
vlans.internal = {
id=100;
interface="eno1";

View file

@ -5,12 +5,20 @@
device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325";
fsType = "btrfs";
neededForBoot = true;
options = [ "subvol=persist" "compress=zstd" "noatime" ];
options = [
"compress=zstd"
"noatime"
"subvol=persist"
];
};
"/kitty" = {
device = "11.0.0.2:/storage/bun";
fsType = "nfs4";
options = [ "x-systemd.automount" "noauto" "soft" "_netdev" ];
options = [
"noauto"
"soft"
"x-systemd.automount"
];
};
};
}

View file

@ -1,7 +1,14 @@
{ config, lib, ... }:
{
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.initrd = {
availableKernelModules = [
"ahci"
"nvme"
"sd_mod"
"xhci_pci"
];
kernelModules = [ "dm-snapshot" ];
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

View file

@ -1,8 +0,0 @@
{ pkgs, ... }:
{
boot = {
kernelPackages = pkgs.linuxPackages_latest;
loader.systemd-boot.enable = true;
plymouth.enable = true;
};
}

View file

@ -1,22 +0,0 @@
{ config, lib, ... }:
{
imports = [
./boot
./disko
./hardware
./network
./services
./users
../../modules/system
];
networking = {
hostName = "pear";
wireless.enable = true;
};
system = {
desktop.enable = true;
stateVersion = "24.11";
};
}

View file

@ -1,93 +0,0 @@
{ config, disko, ... }:
{
imports = [ disko.nixosModules.disko ];
disko.devices = {
disk = {
"${config.networking.hostName}" = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
boot = {
size = "1M";
type = "EF02";
};
ESP = {
size = "2G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "${config.networking.hostName}-disk";
settings.allowDiscards = true;
passwordFile = "/tmp/secret.key";
content = {
type = "lvm_pv";
vg = "${config.networking.hostName}";
};
};
};
};
};
};
};
lvm_vg = {
"${config.networking.hostName}" = {
type = "lvm_vg";
lvs = {
root = {
size = "100%";
content = {
type = "btrfs";
extraArgs = [ "-f" ];
subvolumes = {
"/root" = {
mountpoint = "/";
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
};
"/prev" = {
mountpoint = "/prev";
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
};
"/nix" = {
mountpoint = "/nix";
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
};
# Impermanence
"/persist" = {
mountpoint = "/persist";
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
};
"/persist/.snapshots" = { };
"/persist/home" = { };
"/persist/home/.snapshots" = { };
};
};
};
swap = {
size = "4G";
content = {
type = "swap";
discardPolicy = "both";
};
};
};
};
};
};
# Needed for impermanence
fileSystems."/persist".neededForBoot = true;
}

View file

@ -1,14 +0,0 @@
{ config, lib, modulesPath, ... }:
{
imports = [
(modulesPath + "/hardware/network/broadcom-43xx.nix")
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ "dm-snapshot" "atkbd" "applespi" "intel_lpss_pci" "spi_pxa2xx_platform" ];
boot.kernelModules = [ "kvm-intel" ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -1 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKdjgz+N6uAhMwX/1f9AcgELphPS/dIUoPuLiqeOv5Or

View file

@ -1,16 +0,0 @@
{ config, ... }:
{
services.globalprotect.enable = true;
virtualisation = {
libvirtd.enable = true;
vmware.host.enable = true;
};
nixpkgs.allowUnfreePackages = [ "vmware-workstation" ];
environment.persistence."/persist".directories = [
"/home/${config.sysusers.main}/vmware"
"/home/${config.sysusers.main}/.vmware"
];
}

View file

@ -1,4 +0,0 @@
{ ... }:
{
imports = [ ./main ];
}

View file

@ -1,9 +0,0 @@
{ config, lib, ... }:
{
home-manager.users."${config.sysusers.main}".home = {
desktop.enable = true;
remote-desktop.enable = true;
school.enable = true;
stateVersion = lib.mkForce config.system.stateVersion;
};
}

View file

@ -3,5 +3,9 @@
fileSystems."/persist/storage" = {
device = "/dev/disk/by-uuid/ef465845-cc56-4db5-9260-8ae515eb025e";
fsType = "btrfs";
options = [
"nofail"
"nosuid"
];
};
}

View file

@ -1,7 +1,12 @@
{ lib, ... }:
{
boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_scsi" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.initrd = {
availableKernelModules = [
"xhci_pci"
"virtio_scsi"
];
kernelModules = [ "dm-snapshot" ];
};
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
}

View file

@ -3,6 +3,9 @@
fileSystems."/mnt/Windrive" = {
device = "/dev/disk/by-uuid/582C6B802C6B57D0";
fsType = "ntfs";
options = [ "nosuid" "nodev" ];
options = [
"nodev"
"nosuid"
];
};
}

View file

@ -2,9 +2,21 @@
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "ehci_pci" "sd_mod" "sr_mod" "sdhci_pci" "rtsx_usb_sdmmc" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-amd" ];
boot = {
initrd = {
availableKernelModules = [
"ahci"
"ehci_pci"
"rtsx_usb_sdmmc"
"sd_mod"
"sdhci_pci"
"sr_mod"
"xhci_pci"
];
kernelModules = [ "dm-snapshot" ];
};
kernelModules = [ "kvm-amd" ];
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

View file

@ -54,21 +54,34 @@
subvolumes = {
"/root" = {
mountpoint = "/";
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
mountOptions = [
"noexec"
"compress=zstd"
"ssd"
];
};
"/prev" = {
mountpoint = "/prev";
mountOptions = [ "compress=zstd" "noatime" "ssd" "noexec" ];
mountOptions = [
"compress=zstd"
"ssd"
];
};
"/nix" = {
mountpoint = "/nix";
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
mountOptions = [
"compress=zstd"
"ssd"
];
};
# Impermanence
"/persist" = {
mountpoint = "/persist";
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
mountOptions = [
"compress=zstd"
"ssd"
];
};
"/persist/.snapshots" = { };
"/persist/home" = { };

View file

@ -5,46 +5,75 @@
"/mnt/Linux1" = {
device = "/dev/disk/by-uuid/b2901f8c-ffda-4b88-bb63-a9ea0c96ccb4";
fsType = "ext4";
options = [ "nosuid" "nodev" "nofail" "x-gvfs-show" ];
options = [
"nofail"
"nosuid"
];
};
"/mnt/Linux2" = {
device = "/dev/disk/by-uuid/f08e4f38-162c-402f-ba2a-5925151b78bf";
fsType = "ext4";
options = [ "nosuid" "nodev" "nofail" "x-gvfs-show" ];
options = [
"nofail"
"nosuid"
];
};
"/mnt/Linux3" = {
device = "/dev/disk/by-uuid/e7bc75bd-c371-4b28-b212-7be9b1fad339";
fsType = "ext4";
options = [ "nosuid" "nodev" "nofail" "x-gvfs-show" ];
options = [
"nofail"
"nosuid"
];
};
# Bulk storage mounts
"/persist/var/lib/libvirt" = {
device = "/dev/disk/by-uuid/abf78669-de2a-4afa-8e62-604f4e4cb355";
fsType = "btrfs";
options = [ "subvol=libvirt" "nosuid" "nodev" "nofail" ];
options = [
"nofail"
"nosuid"
"subvol=libvirt"
];
};
"/persist/home/${config.sysusers.main}/VMs" = {
device = "/dev/disk/by-uuid/abf78669-de2a-4afa-8e62-604f4e4cb355";
fsType = "btrfs";
options = [ "subvol=images" "nosuid" "nodev" "nofail" ];
options = [
"nofail"
"nosuid"
"subvol=images"
];
};
# Network mounts
"/home/${config.sysusers.main}/Network/Midas" = {
device = "11.0.0.1:/storage";
fsType = "nfs4";
options = [ "x-systemd.automount" "noauto" "soft" "_netdev" ];
options = [
"noauto"
"soft"
"x-systemd.automount"
];
};
"/home/${config.sysusers.main}/Network/Kitty" = {
device = "11.0.0.2:/storage/bun";
fsType = "nfs4";
options = [ "x-systemd.automount" "noauto" "soft" "_netdev" ];
options = [
"noauto"
"soft"
"x-systemd.automount"
];
};
"/home/${config.sysusers.main}/Network/Prophet" = {
device = "mx.nixfox.ca:/storage";
fsType = "nfs4";
options = [ "x-systemd.automount" "noauto" "soft" "_netdev" ];
options = [
"noauto"
"soft"
"x-systemd.automount"
];
};
};
}

View file

@ -2,9 +2,19 @@
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-amd" ];
boot = {
initrd = {
availableKernelModules = [
"ahci"
"nvme"
"sd_mod"
"usbhid"
"xhci_pci"
];
kernelModules = [ "dm-snapshot" ];
};
kernelModules = [ "kvm-amd" ];
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

View file

@ -1,7 +1,15 @@
{ ... }:
{
networking = {
firewall.allowedUDPPorts = [ 27015 ];
interfaces."enp42s0".ipv4.addresses = [{
address = "10.2.0.100";
prefixLength = 8;
}];
defaultGateway = {
address = "10.1.0.1";
interface = "enp42s0";
};
vlans.internal = {
id=100;
interface="enp42s0";
@ -10,5 +18,7 @@
address = "11.0.0.100";
prefixLength = 8;
}];
firewall.allowedUDPPorts = [ 27015 ];
};
}