From a3cdaa91281c45b7c7716ee36a06700f3bdaf171 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 18 Jul 2026 08:42:02 -0400 Subject: [PATCH] Increase subuid/subgid range to support running buildkit inside podman. --- nix/configuration/roles/podman/default.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/nix/configuration/roles/podman/default.nix b/nix/configuration/roles/podman/default.nix index ba4abe6..09c9261 100644 --- a/nix/configuration/roles/podman/default.nix +++ b/nix/configuration/roles/podman/default.nix @@ -50,6 +50,23 @@ DOCKER_HOST = "unix://$XDG_RUNTIME_DIR/podman/podman.sock"; }; + # Increase subuid / subgid to support running buildkit-rootless + # ref: https://github.com/moby/buildkit/issues/3297 + users.users.talexander = { + subUidRanges = [ + { + startUid = 100000; + count = 262144; # default = 65536 + } + ]; + subGidRanges = [ + { + startGid = 100000; + count = 262144; # default = 65536 + } + ]; + }; + environment.persistence."/state" = lib.mkIf (config.me.mountPersistence) { hideMounts = true; directories = [