summaryrefslogtreecommitdiff
path: root/justfile
diff options
context:
space:
mode:
authorseth <[email protected]>2024-03-08 12:35:32 -0500
committerseth <[email protected]>2024-03-08 12:35:32 -0500
commit27bea676b1c4cc738e6506f6e897d1f5246d5377 (patch)
treecf5e60e1bdf557bc37effb27d9858ce0963815d7 /justfile
parentdc50ae938edcaeded36fcafd6627841f6ca8a397 (diff)
justfile: passthrough more flags
Diffstat (limited to 'justfile')
-rw-r--r--justfile35
1 files changed, 23 insertions, 12 deletions
diff --git a/justfile b/justfile
index 5d4d689..833e151 100644
--- a/justfile
+++ b/justfile
@@ -13,25 +13,34 @@ default:
@just --choose
[private]
-rebuild subcmd:
+rebuild subcmd *extraArgs="":
{{ rebuild }} {{ subcmd }} {{ rebuildArgs }} --flake .
-build: (rebuild "build")
+build *extraArgs="": (rebuild "build" extraArgs)
-dry-run: (rebuild "dry-run")
+dry-run *extraArgs="": (rebuild "dry-run" extraArgs)
-switch: (rebuild "switch")
+switch *extraArgs="": (rebuild "switch" extraArgs)
-test: (rebuild "test")
+test *extraArgs="": (rebuild "test" extraArgs)
-check:
+check *args="":
nix flake check \
--print-build-logs \
--show-trace \
- --accept-flake-config
+ --accept-flake-config \
+ {{ args }}
+
+eval system *args="":
+ nix eval \
+ --raw \
+ '.#nixosConfigurations.{{ system }}.config.system.build.toplevel' \
+ {{ args }}
update:
- nix flake update
+ nix flake update \
+ --commit-lock-file \
+ --commit-lockfile-summary "flake: update all inputs"
update-input input:
nix flake lock \
@@ -39,16 +48,18 @@ update-input input:
--commit-lock-file \
--commit-lockfile-summary "flake: update {{ input }}"
-deploy system:
+deploy system *args="":
nix run \
--inputs-from . \
'nixpkgs#deploy-rs' -- \
- -s '.#{{ system }}'
+ '.#{{ system }}' \
+ {{ args }}
-deploy-all:
+deploy-all *args="":
nix run \
--inputs-from . \
- 'nixpkgs#deploy-rs' -- -s
+ 'nixpkgs#deploy-rs' -- \
+ {{ args }}
clean:
rm -rf \