diff options
author | Freya Murphy <freya@freyacat.org> | 2024-12-12 19:15:02 -0500 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2024-12-12 19:15:02 -0500 |
commit | 141e111a489ce91fac611537f6b718a57f556c4e (patch) | |
tree | ca8078761af62502d053096a4f141abbee860323 | |
parent | build-installer script (diff) | |
download | dotfiles-guix-141e111a489ce91fac611537f6b718a57f556c4e.tar.gz dotfiles-guix-141e111a489ce91fac611537f6b718a57f556c4e.tar.bz2 dotfiles-guix-141e111a489ce91fac611537f6b718a57f556c4e.zip |
update repo path resolution in scripts
-rwxr-xr-x | scripts/build-installer | 5 | ||||
-rwxr-xr-x | scripts/reconfigure-system | 5 | ||||
-rwxr-xr-x | scripts/reconfigure-user | 5 | ||||
-rwxr-xr-x | scripts/update-commits | 4 |
4 files changed, 10 insertions, 9 deletions
diff --git a/scripts/build-installer b/scripts/build-installer index e3c4fcb..e8fd399 100755 --- a/scripts/build-installer +++ b/scripts/build-installer @@ -1,5 +1,6 @@ #!/bin/sh -repo="$HOME/.config/guix" +retry="$(dirname $0)/guix-retry" +repo="$(realpath "$(dirname $0)/..")" date="$(date -Iseconds)" -image=$(guix-retry guix system -L "$repo/modules" image -t iso9660 "$repo/systems/installer.scm") +image=$("$retry" guix system -L "$repo/modules" image -t iso9660 "$repo/systems/installer.scm") cp $image "./guix-installer-$date.iso" diff --git a/scripts/reconfigure-system b/scripts/reconfigure-system index 3d378f3..19792d1 100755 --- a/scripts/reconfigure-system +++ b/scripts/reconfigure-system @@ -1,3 +1,4 @@ #!/bin/sh -repo="$HOME/.config/guix" -sudo -E guix-retry guix system -L "$repo/modules" reconfigure "$repo/systems/$(hostname).scm" +retry="$(dirname $0)/guix-retry" +repo="$(realpath "$(dirname $0)/..")" +sudo -E "$retry" guix system -L "$repo/modules" reconfigure "$repo/systems/$(hostname).scm" diff --git a/scripts/reconfigure-user b/scripts/reconfigure-user index bdc8ca9..055cc77 100755 --- a/scripts/reconfigure-user +++ b/scripts/reconfigure-user @@ -1,4 +1,5 @@ #!/bin/sh -repo="$HOME/.config/guix" -guix-retry guix home -L "$repo/modules" reconfigure "$repo/home/home.scm" +retry="$(dirname $0)/guix-retry" +repo="$(realpath "$(dirname $0)/..")" +"$retry" guix home -L "$repo/modules" reconfigure "$repo/home/home.scm" home-manager switch diff --git a/scripts/update-commits b/scripts/update-commits index 15e38b1..fc19f40 100755 --- a/scripts/update-commits +++ b/scripts/update-commits @@ -15,9 +15,7 @@ ;; (define %dotfiles-dir - (string-append - (getenv "HOME") - "/.config/guix")) + (dirname (dirname (current-filename)))) (define %guix-channels-file (string-append %dotfiles-dir "/channels.scm")) |