nix-dev-home
nix-dev-home copied to clipboard
executables like `sudo` in NixOS come from `/run/wrappers/bin`
If not present, sudo command will fail to run in NixOS if someone is sharing this configuration across NixOS, macOS and other linux distro.
This is on my NixOS:
shivaraj in 🌐 nixos in nix-dev-home on export-wrappers-path
❯ which sudo
/run/wrappers/bin/sudo
If not present, it might be symlinked elsewhere, like:
❯ which sudo
/run/current-system/sw/bin/sudo
Leading to:
❯ sudo
sudo: /run/current-system/sw/bin/sudo must be owned by uid 0 and have the setuid bit set
This might be related: https://discourse.nixos.org/t/sudo-run-current-system-sw-bin-sudo-must-be-owned-by-uid-0-and-have-the-setuid-bit-set-and-cannot-chdir-var-cron-bailing-out-var-cron-permission-denied/20463
Alternatively, we can just test for stdenv.isLinux.
Let's re-evaluate this as part of #86