Comment on Managing podman quadlets, users subids and such
InnerScientist@lemmy.world 1 week ago
I have a Server with ~16 podman services, each their own user, network namespace and uids. This is managed using NixOS and Home manager (which supports quadlets) but I am changing my setup to a single node k3s cluster with user namespaces because that seems simpler to manage. Here a snippet for how the subuids/subuids are defined:
users.users.<username> = { subUidRanges = [{ startUid = 100000+65536*( config.users.users.<username>.uid - 999); count = 65536; }]; subGidRanges = [{ startGid = 100000+65536*( config.users.users.<username>.uid - 999); count = 65536; }]; home = "[...]"; isNormalUser = true; linger = true; group = "users"; openssh.authorizedKeys.keys = config.users.users.root.openssh.authorizedKeys.keys; };