just: improve push
This commit is contained in:
parent
334b7cf7bd
commit
3b62429e73
|
@ -296,7 +296,11 @@
|
||||||
in {
|
in {
|
||||||
# TODO: get faketty to work ${expect}/bin/unbuffer is bad
|
# TODO: get faketty to work ${expect}/bin/unbuffer is bad
|
||||||
nixos-rebuild-nom = pkgs.writeScriptBin "nixos-rebuild" ''
|
nixos-rebuild-nom = pkgs.writeScriptBin "nixos-rebuild" ''
|
||||||
exec ${lib.getExe pkgs.nixos-rebuild} "$@" |& ${lib.getExe pkgs.nix-output-monitor}
|
if test -t 1 || test -z "''${NIX_NO_NOM-}"; then
|
||||||
|
exec ${lib.getExe pkgs.nixos-rebuild} "$@" -L |& ${lib.getExe pkgs.nix-output-monitor}
|
||||||
|
else
|
||||||
|
exec ${lib.getExe pkgs.nixos-rebuild} "$@" -L
|
||||||
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nspawn-setup-brumlebasse = mk-nspawn-deployer "brumlebasse";
|
nspawn-setup-brumlebasse = mk-nspawn-deployer "brumlebasse";
|
||||||
|
|
4
justfile
4
justfile
|
@ -33,7 +33,9 @@ boot:
|
||||||
sudo nixos-rebuild boot --flake .
|
sudo nixos-rebuild boot --flake .
|
||||||
|
|
||||||
push hostname=`just _a-host` cmd=`gum choose test switch boot --header "Select mode..."`:
|
push hostname=`just _a-host` cmd=`gum choose test switch boot --header "Select mode..."`:
|
||||||
nixos-rebuild --flake .#{{hostname}} --target-host root@$(nix eval .#nixosReports.{{hostname}}.fqdn --json | jq . -r) --use-substitutes {{cmd}}
|
nixos-rebuild build --flake .#{{hostname}}
|
||||||
|
@echo pushing...
|
||||||
|
NIX_NO_NOM=1 NIX_SSHOPTS="-tt" nixos-rebuild {{cmd}} --flake .#{{hostname}} --use-remote-sudo --target-host $(nix eval .#nixosReports.{{hostname}}.fqdn --json | jq . -r) --use-substitutes
|
||||||
|
|
||||||
@_a-host:
|
@_a-host:
|
||||||
nix eval .#nixosReports --apply builtins.attrNames --json 2>/dev/null | jq '.[]' -r | gum filter --placeholder "Pick a host..."
|
nix eval .#nixosReports --apply builtins.attrNames --json 2>/dev/null | jq '.[]' -r | gum filter --placeholder "Pick a host..."
|
||||||
|
|
Loading…
Reference in New Issue