From bf47ad445c22ca8cb0c4f64c3305bd54993f0b1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Numbus?= Date: Sun, 25 Jan 2026 15:23:08 +0100 Subject: [PATCH] Fixed some quirks. --- deploy.sh | 1 + templates/nix-config/disks/boot-1.nix | 41 +++++--- templates/nix-config/disks/boot-2.nix | 116 +++++++++++------------ templates/nix-config/misc/activation.nix | 4 - templates/nix-config/misc/networking.nix | 1 - 5 files changed, 89 insertions(+), 74 deletions(-) diff --git a/deploy.sh b/deploy.sh index 7d4cde9..06a1678 100644 --- a/deploy.sh +++ b/deploy.sh @@ -387,6 +387,7 @@ services_generation() { envsubst < templates/podman-config/traefik/traefik.yaml > final-nix-config/mnt/config/traefik/traefik.yaml for service in "${SELECTED_SERVICES[@]}"; do + [[ "${service}" != "virtualization" ]] && cp -avu templates/nix-config/podman/"${service}".nix final-nix-config/etc/nixos/podman/"${service}".nix if [[ "${service}" == "frigate" ]]; then local FRIGATE_DEVICES_BLOCK="" diff --git a/templates/nix-config/disks/boot-1.nix b/templates/nix-config/disks/boot-1.nix index 00fbdf9..89af7e4 100644 --- a/templates/nix-config/disks/boot-1.nix +++ b/templates/nix-config/disks/boot-1.nix @@ -5,21 +5,40 @@ pool = { type = "lvm_vg"; lvs = { - root = { - size = "100%FREE"; - content.type = "filesystem"; - content.format = "btrfs"; - content.mountpoint = "/"; + swap = { + size = "16G"; + content = { + type = "swap"; + }; }; snapraid = { size = "1G"; - content.type = "filesystem"; - content.format = "btrfs"; - content.mountpoint = "/mnt/content-0"; + content = { + type = "filesystem"; + format = "btrfs"; + mountpoint = "/mnt/content-0"; + }; }; - swap = { - size = "16G"; - content.type = "swap"; + root = { + size = "100%"; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "/rootfs" = { + mountpoint = "/"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; + "/home" = { + mountpoint = "/home"; + mountOptions = [ "compress=zstd" ]; + }; + "/nix" = { + mountpoint = "/nix"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; + }; + }; }; }; }; diff --git a/templates/nix-config/disks/boot-2.nix b/templates/nix-config/disks/boot-2.nix index f0a6c99..cde81f9 100644 --- a/templates/nix-config/disks/boot-2.nix +++ b/templates/nix-config/disks/boot-2.nix @@ -1,5 +1,63 @@ { disko.devices = { + mdadm = { + boot = { + type = "mdadm"; + level = 1; + metadata = "1.2"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + }; + lvm_vg = { + pool = { + type = "lvm_vg"; + lvs = { + swap = { + size = "16G"; + lvm_type = "mirror"; + content = { + type = "swap"; + }; + }; + snapraid = { + size = "1G"; + lvm_type = "mirror"; + content = { + type = "filesystem"; + format = "btrfs"; + mountpoint = "/mnt/content-0"; + }; + }; + root = { + size = "100%"; + lvm_type = "mirror"; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "/rootfs" = { + mountpoint = "/"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; + "/home" = { + mountpoint = "/home"; + mountOptions = [ "compress=zstd" ]; + }; + "/nix" = { + mountpoint = "/nix"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; + }; + }; + }; + }; + }; + }; disk = { boot-1 = { type = "disk"; @@ -65,61 +123,3 @@ }; }; }; - }; - mdadm = { - boot = { - type = "mdadm"; - level = 1; - metadata = "1.2"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - mountOptions = [ "umask=0077" ]; - }; - }; - }; - lvm_vg = { - pool = { - type = "lvm_vg"; - lvs = { - swap = { - size = "16G"; - lvm_type = "mirror"; - content = { - type = "swap"; - }; - }; - snapraid = { - size = "1G"; - lvm_type = "mirror"; - content = { - type = "filesystem"; - format = "btrfs"; - mountpoint = "/mnt/content-0"; - }; - }; - root = { - size = "100%"; - lvm_type = "mirror"; - content = { - type = "btrfs"; - extraArgs = [ "-f" ]; - subvolumes = { - "/rootfs" = { - mountpoint = "/"; - mountOptions = [ "compress=zstd" "noatime" ]; - }; - "/home" = { - mountpoint = "/home"; - mountOptions = [ "compress=zstd" ]; - }; - "/nix" = { - mountpoint = "/nix"; - mountOptions = [ "compress=zstd" "noatime" ]; - }; - }; - }; - }; - }; - }; diff --git a/templates/nix-config/misc/activation.nix b/templates/nix-config/misc/activation.nix index bb7961a..823bfa8 100644 --- a/templates/nix-config/misc/activation.nix +++ b/templates/nix-config/misc/activation.nix @@ -45,10 +45,6 @@ export PATH=$PATH:/run/wrappers/bin - if [[ -e /home/numbus-admin/.numbus-server/networked.true ]]; then - exit 0 - fi - PODMAN_NETWORKS mkdir -p /home/numbus-admin/.numbus-server/ touch /home/numbus-admin/.numbus-server/networked.true diff --git a/templates/nix-config/misc/networking.nix b/templates/nix-config/misc/networking.nix index fbcf4eb..d43c090 100644 --- a/templates/nix-config/misc/networking.nix +++ b/templates/nix-config/misc/networking.nix @@ -5,7 +5,6 @@ networking.hostName = "numbus-server"; networking.networkmanager.enable = false; - networking.resolvconf.enable = false; networking.nftables.enable = true; networking.firewall.enable = true;