diff --git a/flake.nix b/flake.nix index 2fa12ed..92f0fff 100644 --- a/flake.nix +++ b/flake.nix @@ -296,7 +296,11 @@ in { # TODO: get faketty to work ${expect}/bin/unbuffer is bad 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"; diff --git a/justfile b/justfile index 20feaae..13305b6 100644 --- a/justfile +++ b/justfile @@ -33,7 +33,9 @@ boot: sudo nixos-rebuild boot --flake . 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: nix eval .#nixosReports --apply builtins.attrNames --json 2>/dev/null | jq '.[]' -r | gum filter --placeholder "Pick a host..."