From 2aeed8f2319189f1c7a7a758b9e27fd5583e281d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Sun, 1 Feb 2026 11:17:48 +0100 Subject: [PATCH] template2: add filesystem definitions to support normal builds Add filesystem configuration matching Proxmox image builder output to allow template2 to build with both `nixos-rebuild build` and `nixos-rebuild build-image --image-variant proxmox`. Filesystem specs discovered from running VM: - ext4 filesystem with label "nixos" - x-systemd.growfs option for automatic partition growth - No swap partition Using lib.mkDefault ensures these definitions work for normal builds while allowing the Proxmox image builder to override when needed. Co-Authored-By: Claude Sonnet 4.5 --- hosts/template2/hardware-configuration.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hosts/template2/hardware-configuration.nix b/hosts/template2/hardware-configuration.nix index 7086fe9..1c2878b 100644 --- a/hosts/template2/hardware-configuration.nix +++ b/hosts/template2/hardware-configuration.nix @@ -25,6 +25,15 @@ ]; boot.extraModulePackages = [ ]; + # Filesystem configuration matching Proxmox image builder output + fileSystems."/" = lib.mkDefault { + device = "/dev/disk/by-label/nixos"; + fsType = "ext4"; + options = [ "x-systemd.growfs" ]; + }; + + swapDevices = lib.mkDefault [ ]; + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's # still possible to use this option, but it's recommended to use it in conjunction