Silence the push and pop directory commands

This commit is contained in:
Lillian Violet 2024-02-29 15:02:42 +01:00
parent c102f8a05c
commit f982d225e5
2 changed files with 11 additions and 11 deletions

View file

@ -12,10 +12,10 @@ writeShellApplication
text = '' text = ''
# An install script for NixOS installation to /tmp # An install script for NixOS installation to /tmp
set -e set -e
pushd /tmp pushd /tmp > /dev/null
rm -rf ./install-nix rm -rf ./install-nix
git clone https://git.lillianviolet.dev/Lillian-Violet/NixOS-Config.git ./install-nix git clone https://git.lillianviolet.dev/Lillian-Violet/NixOS-Config.git ./install-nix
pushd ./install-nix/nixos/hosts pushd ./install-nix/nixos/hosts > /dev/null
echo "Please choose the hostname you are installing to from the following list:" echo "Please choose the hostname you are installing to from the following list:"
i=1 i=1
for d in */ for d in */
@ -23,14 +23,14 @@ writeShellApplication
dirs[i++]="''${d%/}" dirs[i++]="''${d%/}"
done done
select dir in "''${dirs[@]}"; do echo "you selected ''${dir}"; break; done select dir in "''${dirs[@]}"; do echo "you selected ''${dir}"; break; done
popd popd > /dev/null
pushd ./install-nix pushd ./install-nix > /dev/null
echo "NixOS Installing..." echo "NixOS Installing..."
sudo nixos-install --flake .#"''${dir}" sudo nixos-install --flake .#"''${dir}"
popd popd > /dev/null
echo "Cleaning up repository in tmp..." echo "Cleaning up repository in tmp..."
rm -rf ./install-nix rm -rf ./install-nix
popd popd > /dev/null
notify-send -e "NixOS Install Succeeded!" --icon=software-update-available notify-send -e "NixOS Install Succeeded!" --icon=software-update-available
''; '';
} }

View file

@ -12,16 +12,16 @@ writeShellApplication
text = '' text = ''
# A rebuild script for NixOS # A rebuild script for NixOS
set -e set -e
pushd /tmp pushd /tmp > /dev/null
rm -rf ./rebuild rm -rf ./rebuild
git clone https://git.lillianviolet.dev/Lillian-Violet/NixOS-Config.git ./rebuild git clone https://git.lillianviolet.dev/Lillian-Violet/NixOS-Config.git ./rebuild
pushd ./rebuild pushd ./rebuild > /dev/null
echo "NixOS Rebuilding..." echo "NixOS Rebuilding..."
sudo nixos-rebuild switch --flake .# sudo nixos-rebuild switch --flake .#
popd popd > /dev/null
echo "Cleaning up repository in tmp..." echo "Cleaning up repository in /tmp..."
rm -rf ./rebuild rm -rf ./rebuild
popd popd > /dev/null
notify-send -e "NixOS Rebuilt OK!" --icon=software-update-available notify-send -e "NixOS Rebuilt OK!" --icon=software-update-available
''; '';
} }