aboutsummaryrefslogtreecommitdiffhomepage
path: root/justfile
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-07-01 23:12:26 +0900
committernsfisis <nsfisis@gmail.com>2025-07-01 23:12:26 +0900
commit270a36cedc632241cd9dc5fc09f88aba983c4195 (patch)
tree99ee3fbe043ae8431693a7ace272e4128b88af4c /justfile
parent4de0bcf62a7ad1b6171fa30f205e00b6bc9c8dcb (diff)
downloaddotfiles-270a36cedc632241cd9dc5fc09f88aba983c4195.tar.gz
dotfiles-270a36cedc632241cd9dc5fc09f88aba983c4195.tar.zst
dotfiles-270a36cedc632241cd9dc5fc09f88aba983c4195.zip
meta/just: allow to omit HOST argument
Diffstat (limited to 'justfile')
-rw-r--r--justfile8
1 files changed, 5 insertions, 3 deletions
diff --git a/justfile b/justfile
index 13b71aa..8eb6577 100644
--- a/justfile
+++ b/justfile
@@ -1,7 +1,9 @@
+default_host := trim_start_match(file_stem(shell('grep -R -l "$1" "$2"', '"hostname": "' + shell('uname -n') + '"', join(justfile_directory(), "mitamae"))), 'node.')
+
help:
@just --list
-update HOST:
+update HOST=default_host:
nix flake update
git add -- ./flake.lock
git commit -m "nix: update flake"
@@ -10,14 +12,14 @@ update HOST:
update-nur-packages:
nix flake update nur-packages
-sync HOST:
+sync HOST=default_host:
git fetch --all
git stash save
git switch -d origin/main
git stash pop
just switch "{{HOST}}"
-switch HOST:
+switch HOST=default_host:
home-manager switch --flake ".#{{HOST}}"
gc: