]> git.scottworley.com Git - auto-upgrade-with-pinch/commit - modules/auto-upgrade.nix
When becoming other users, cd to /
authorScott Worley <scottworley@scottworley.com>
Sat, 21 Dec 2024 04:23:06 +0000 (20:23 -0800)
committerScott Worley <scottworley@scottworley.com>
Sat, 21 Dec 2024 04:23:06 +0000 (20:23 -0800)
commit98604ba76ee41d5835d3f0d4ef76e7250d9f59c2
treef13d74592355478764a0b379b220a363e9a5019f
parent75da61c3ae743d49b32b4868dff552e03b3cf445
When becoming other users, cd to /

When building '<nixpkgs>', nix-build checks to see if there is a file
literally called '<nixpkgs>' in the current directory (why?! it doesn't
use it if there is one).  If it can't access the current directory to
do this check, it fails with the error message:

  error: filesystem error: symlink_status: Permission denied [/home/alice/<nixpkgs>]

So we cd to a place where it can read the current directory.
modules/auto-upgrade.nix