Get size of /nix/store efficiently

:slight_smile: Hehe good news, in case you want to have that mount-flag on all filesystems.

/nix/store does not contain suid binaries, as nix build runs unprivileged, therefor can’t set suid - in addition it would cause security issues, such as when eject which is a suid binary contains a suid-exploiting CVE, you would have to remove the binary from your immutable store in order to fix the security issue.

Instead you have the option security.wrappers which bundles all required binaries in a tmpfs under /run/wrappers/bin - which is populated by the systemd service suid-sgid-wrappers.service which just stars a shell-script that runs basically cp + chmod from the nix store into the tmpfs.

2 Likes