aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xscripts/pretty-rebuild8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/pretty-rebuild b/scripts/pretty-rebuild
index 613ce2b..889a3d1 100755
--- a/scripts/pretty-rebuild
+++ b/scripts/pretty-rebuild
@@ -1,9 +1,15 @@
#!/usr/bin/env nix-shell
#!nix-shell -i zsh --packages nvd zsh
+if [[ ${@} =~ "--flake" ]]; then
+ args=(${=@})
+else
+ args=("--flake .#$(hostname -s)" ${=@})
+fi
+
cd /etc/nixos && \
nix flake update && \
- nixos-rebuild switch --upgrade --show-trace ${@} && \
+ nixos-rebuild switch --upgrade --show-trace ${args} && \
echo && \
nixos-rebuild list-generations | cat && \
echo && \