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

@ -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 ];
};
}