dot
vizie's NixOS desktop: Hyprland, CachyOS kernel and gaming tweaks
eb2c84a
1 file changed +4 −1
modifiedtools/backup-to-sata
@@ -14,6 +14,9 @@ | ||
| 14 | 14 | repo=$home/git/dot |
| 15 | 15 | wow="$home/Games/battlenet/drive_c/Program Files (x86)/World of Warcraft/_retail_" |
| 16 | 16 | |
| 17 | +# sudo's PATH leaves out Nix (installed with the official installer here). | |
| 18 | +export PATH="$PATH:/nix/var/nix/profiles/default/bin" | |
| 19 | + | |
| 17 | 20 | if [ "$EUID" -ne 0 ]; then |
| 18 | 21 | echo "Run it with sudo: sudo $0" >&2 |
| 19 | 22 | exit 1 |
@@ -46,7 +49,7 @@ | ||
| 46 | 49 | install -d -o "$user" "$mnt/nix-cache" "$mnt/wow" |
| 47 | 50 | |
| 48 | 51 | echo "== Saving the built system and the disko script" |
| 49 | -sudo -u "$user" bash -euo pipefail -c ' | |
| 52 | +sudo -u "$user" env PATH="$PATH" bash -euo pipefail -c ' | |
| 50 | 53 | cd "$1" |
| 51 | 54 | sys=$(nix build --no-link --print-out-paths .#nixosConfigurations.desktop.config.system.build.toplevel) |
| 52 | 55 | disko=$(nix build --no-link --print-out-paths .#nixosConfigurations.desktop.config.system.build.diskoScript) |