Use nix-output-monitor in all scripts

This commit is contained in:
Andreas Zweili 2023-11-26 12:14:08 +01:00
parent ab866b4965
commit 3d32f750f0
8 changed files with 10 additions and 9 deletions

View File

@ -79,7 +79,7 @@
format-modules = "nixpkgs-fmt **/*.nix"; format-modules = "nixpkgs-fmt **/*.nix";
nix-generations = "sudo nix-env --list-generations --profile /nix/var/nix/profiles/system"; nix-generations = "sudo nix-env --list-generations --profile /nix/var/nix/profiles/system";
rebuild = '' rebuild = ''
nixos-rebuild -j auto switch --use-remote-sudo nixos-rebuild -j auto switch --use-remote-sudo |& nom
''; '';
find-garbage = "ls -l /nix/var/nix/gcroots/auto/ | sort | grep '/home/'"; find-garbage = "ls -l /nix/var/nix/gcroots/auto/ | sort | grep '/home/'";
vm = "vim"; vm = "vim";

View File

@ -5,6 +5,6 @@ image=~/Downloads/$host.img.zst
cd ~/.nixos/ cd ~/.nixos/
nix build .#images.$host && nom build .#images.$host &&
cp result/sd-image/*.img.zst $image cp result/sd-image/*.img.zst $image
chmod 644 $image chmod 644 $image

View File

@ -6,4 +6,4 @@ echo "experimental-features = nix-command flakes" > ~/.config/nix/nix.conf
nix-shell '<home-manager>' -A install nix-shell '<home-manager>' -A install
rm ~/.config/nixpkgs/home.nix rm ~/.config/nixpkgs/home.nix
ln -s $HOME/.nixos/flake.nix $HOME/.config/nixpkgs/flake.nix ln -s $HOME/.nixos/flake.nix $HOME/.config/nixpkgs/flake.nix
home-manager switch home-manager switch |& nom

View File

@ -2,4 +2,4 @@
host=$1 host=$1
fqdn="nixos@nixos.2li.local" fqdn="nixos@nixos.2li.local"
nixos-rebuild switch --use-remote-sudo --target-host $fqdn --impure --flake ".#$host" nixos-rebuild switch --use-remote-sudo --target-host $fqdn --impure --flake ".#$host" |& nom

View File

@ -32,10 +32,10 @@ do
fqdn="$host.2li.local" fqdn="$host.2li.local"
if [ $reboot -eq 0 ]; then if [ $reboot -eq 0 ]; then
echo $fqdn echo $fqdn
nixos-rebuild switch -j auto --use-remote-sudo --target-host $fqdn --flake ".#$host" nixos-rebuild switch -j auto --use-remote-sudo --target-host $fqdn --flake ".#$host" |& nom
else else
echo "$fqdn with reboot" echo "$fqdn with reboot"
nixos-rebuild boot -j auto --use-remote-sudo --target-host $fqdn --flake ".#$host" && nixos-rebuild boot -j auto --use-remote-sudo --target-host $fqdn --flake ".#$host" |& nom
ssh -i $rsa_key $fqdn 'sudo reboot' ssh -i $rsa_key $fqdn 'sudo reboot'
fi fi
echo echo

View File

@ -17,7 +17,7 @@ do
continue continue
fi fi
echo $host echo $host
nixos-rebuild dry-build --flake .#${host} nixos-rebuild dry-build --flake .#${host} |& nom
echo echo
echo echo
done done

View File

@ -5,4 +5,4 @@ export NIX_SSHOPTS="-t -i $rsa_key"
host=$1 host=$1
fqdn="$host.2li.local" fqdn="$host.2li.local"
nixos-rebuild switch --use-remote-sudo --target-host $fqdn --flake ".#$host" nixos-rebuild switch --use-remote-sudo --target-host $fqdn --flake ".#$host" |& nom

View File

@ -4,6 +4,7 @@ pkgs.mkShell {
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
git git
nixFlakes nixFlakes
nix-output-monitor
python310 python310
python310Packages.black python310Packages.black
python310Packages.mypy python310Packages.mypy