removed git tracking requirement from rebuilds

This commit is contained in:
Leyla Becker 2024-09-24 01:29:22 -05:00
parent 22ef0e838d
commit 8adc6b97cd
2 changed files with 5 additions and 3 deletions

View file

@ -54,11 +54,13 @@ flake=${flake:-$target}
mode=${mode:-switch}
user=${user:-$USER}
# path: prefixes on rebuilds here make nix not treat this flake like it has a git repo so we can
# access secret files in the submodule this is kinda bad and we should find a way to not need it
if [[ "$target" == "$(hostname)" ]];
then
nixos-rebuild $mode --use-remote-sudo --flake .#$flake
nixos-rebuild $mode --use-remote-sudo --flake path:.#$flake
else
nixos-rebuild $mode --use-remote-sudo --target-host $user@$target --flake .#$flake
nixos-rebuild $mode --use-remote-sudo --target-host $user@$target --flake path:.#$flake
fi
if [ -d "result" ];