about summary refs log tree commit diff
path: root/src/libutil/compression.hh
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2018-09-05T00·32-0500
committerMatthew Bauer <mjbauer95@gmail.com>2018-09-05T00·32-0500
commit74f6d8767de13980b0e83a249633ee4a7e6fc547 (patch)
treecd8947808b49c9f6d3140ffaaa21b3e2798dbd05 /src/libutil/compression.hh
parent5e0a7206f59df575582f42415fc3df59b0d640cb (diff)
Get effective user in Nix commands
‘geteuid’ gives us the user that the command is being run as,
including in setuid modes. By using geteuid to determind id, we can
avoid the ‘sudo -i’ hack when upgrading Nix. So now, upgrading Nix on
macOS is as simple as:

$ sudo nix-channel --update
$ sudo nix-env -u

$ sudo launchctl stop org.nixos.nix-daemon
$ sudo launchctl start org.nixos.nix-daemon
or
$ sudo systemctl restart nix-daemon
Diffstat (limited to 'src/libutil/compression.hh')
0 files changed, 0 insertions, 0 deletions