From 2ddc792d9251677ed22a57dd1f61b37382df2ae3 Mon Sep 17 00:00:00 2001 From: Kalle Struik Date: Fri, 22 Nov 2024 20:55:14 +0100 Subject: [PATCH] Add systemd repart to grow root partition on boot --- systems/base/configuration.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/systems/base/configuration.nix b/systems/base/configuration.nix index 5054362..cb29ecd 100644 --- a/systems/base/configuration.nix +++ b/systems/base/configuration.nix @@ -21,7 +21,6 @@ services.qemuGuest.enable = lib.mkDefault true; boot.loader.systemd-boot.enable = true; - boot.growPartition = lib.mkDefault true; # Allow remote updates with flakes and non-root users nix.settings.trusted-users = [ @@ -98,6 +97,20 @@ }; }; + boot.initrd.systemd.repart.enable = true; + systemd.repart.partitions = { + "00-esp" = { + Type = "esp"; + SizeMinBytes = "550M"; + SizeMaxBytes = "550M"; + Format = "vfat"; + }; + "10-root" = { + Type = "root"; + Format = "btrfs"; + }; + }; + system.stateVersion = lib.mkDefault "24.05"; }; }