!VRULIdgoKmKPzJZzjj:nixos.org

Nix Package Manager development

894 Members
For people hacking on Nix: https://github.com/NixOS/nix Nix maintainers can be reached here.189 Servers

Load older messages


SenderMessageTime
3 Mar 2026
@eveeifyeve:matrix.orgeveeifyeveIs this for msys2 mingw?02:19:04
@eveeifyeve:matrix.orgeveeifyeveBecause I am happy to look at it, once you have pushed the code, tonight as I am currently in my lunch break at school.02:19:34
@puffnfresh:chat.home.brianmckenna.orgpuffnfresh yeah that's already on master, and I just noticed I posted in the wrong room, was meant for #windows:nixos.org 02:25:41
@sodiboo:gaysex.cloudsodiboo changed their profile picture.19:19:25
@moonburst:moonburst.netMoon Burst joined the room.20:08:02
@aaronchallmba:matrix.orgAaron Hall joined the room.23:42:32
5 Mar 2026
@pveierland:matrix.orgpveierland When using nix eval --eval-store /some/path - will any GC nominally be involved such that GC roots are still important - or would the eval store normally not be GCd? 01:26:39
@mtheil:scs.ems.hostMarkus Theil (SCS) changed their display name from Markus Theil to Markus Theil (SCS).09:34:09
@focu5:rhakotis.xyzfocu5 joined the room.14:17:05
@kintrix:matrix.org@kintrix:matrix.org left the room.17:12:14
@ysndr:matrix.orgysndr

When using a shell with a chroot store, it seems we’re loosing some uid information preventing eg sudo from working properly:

nix shell nixpkgs#hello --store ./test -c sudo whoami
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set

I also noticed that using —store inside a chroot shell isn’t working either fwiw and am trying to connect the dots here

17:45:17
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)
In reply to @ysndr:matrix.org

When using a shell with a chroot store, it seems we’re loosing some uid information preventing eg sudo from working properly:

nix shell nixpkgs#hello --store ./test -c sudo whoami
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set

I also noticed that using —store inside a chroot shell isn’t working either fwiw and am trying to connect the dots here

Hm worth a chroot store nix sets up a mounts
17:49:24
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)
In reply to @ysndr:matrix.org

When using a shell with a chroot store, it seems we’re loosing some uid information preventing eg sudo from working properly:

nix shell nixpkgs#hello --store ./test -c sudo whoami
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set

I also noticed that using —store inside a chroot shell isn’t working either fwiw and am trying to connect the dots here

* Hm worth a chroot store nix sets up a mountns
17:49:31
@xokdvium:matrix.orgSergei Zimmerman (xokdvium) worth -> with 17:49:51
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)The mounts there are quite messed up probably17:50:58
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)I’m no Linux guru though and haven’t looked at that code too closely, so I’m not sure how to go about fixing it. I think there was a fixme about using overlayfs for the relocated store IIRC17:53:00
@ysndr:matrix.orgysndr

Yea it’s user / mount namespace all the way.

At least root seems to not be mapper correctly (sudo is owned by nobody, as opposed to root)

17:57:42
@ysndr:matrix.orgysndr * Yea it’s user / mount namespace all the way.
At least root seems to not be mapped correctly (sudo is owned by nobody, as opposed to root)
17:57:47
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Ah do we not set up a proper uid_map?18:07:34
6 Mar 2026
@gilligan:matrix.orggilligan (he/him) joined the room.01:45:50
@azosion_:matrix.orgAzosion joined the room.03:32:29
@dramforever:matrix.orgdramforever there's no way to do this without running nix shell with root permissions 05:01:17
@dramforever:matrix.orgdramforeversee https://man7.org/linux/man-pages/man7/user_namespaces.7.html "In order for a process to write to the /proc/pid/uid_map", currently bullet 5, (b), bullet 105:02:16
@dramforever:matrix.orgdramforever * see https://man7.org/linux/man-pages/man7/user_namespaces.7.html "In order for a process to write to the /proc/pid/uid_map ...", currently bullet 5, (b), bullet 1 05:02:25
@dramforever:matrix.orgdramforeverand we have to be in a new user namespace to create a mount namespace and start mounting stuff05:03:36
@dramforever:matrix.orgdramforever *

see https://man7.org/linux/man-pages/man7/user_namespaces.7.html "In order for a process to write to the /proc/pid/uid_map ...", currently bullet 5, (b), bullet 1

The data written to uid_map (gid_map) must consist of a single line that maps the writing process's effective user ID (group ID) in the parent user namespace to a user ID (group ID) in the user namespace.

05:04:37
@dramforever:matrix.orgdramforever side note, don't you love it when all you need to understand is 1 and 2 and 3 and ( 4(a) or 4(b) ) and ( 5(a) or ( 5(b)1 and 5(b)2 and 5(b)3 ) ) 05:06:11
@dramforever:matrix.orgdramforever so just, to clarify, putting aside everything else, 5(b)1 says that if you don't have CAP_SETUID, then you can only map yourself in the parent userns to any uid in the child userns. everyone else in the parent userns becomes nobody in the child 05:07:56
@dramforever:matrix.orgdramforever * so just, to clarify, putting aside everything else, 5(b)1 says that if you don't have CAP_SETUID, then you can only map yourself in the parent userns to any uid in the child userns. everyone else in the parent userns becomes nobody in the child userns 05:08:26
@dramforever:matrix.orgdramforever * so just, to clarify, putting aside everything else, 5(b)1 says that if you don't have CAP_SETUID in the parent userns, then you can only map yourself in the parent userns to any uid in the child userns. everyone else in the parent userns becomes nobody in the child userns 05:08:36

There are no newer messages yet.


Back to Room ListRoom Version: 6