From 8adc6b97cd424a01510f287e6bd786bb24dd8d1b Mon Sep 17 00:00:00 2001 From: Leyla Becker Date: Tue, 24 Sep 2024 01:29:22 -0500 Subject: [PATCH] removed git tracking requirement from rebuilds --- install.sh | 2 +- rebuild.sh | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 882a935..d7e10df 100755 --- a/install.sh +++ b/install.sh @@ -51,4 +51,4 @@ mkdir -p $temp$SOPS_AGE_KEY_DIRECTORY cp -r $SOPS_AGE_KEY_DIRECTORY/* $temp$SOPS_AGE_KEY_DIRECTORY # commit number in this is because the main branch of nixos-anywhere is broken right now -nix run github:nix-community/nixos-anywhere/b3b6bfebba35d55fba485ceda588984dec74c54f -- --extra-files $temp --flake ".#$flake" ${user:-nixos}@$target +nix run github:nix-community/nixos-anywhere/b3b6bfebba35d55fba485ceda588984dec74c54f -- --extra-files $temp --flake "path:.#$flake" ${user:-nixos}@$target diff --git a/rebuild.sh b/rebuild.sh index 9988b7b..96cfc3d 100755 --- a/rebuild.sh +++ b/rebuild.sh @@ -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" ];