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";
nix-generations = "sudo nix-env --list-generations --profile /nix/var/nix/profiles/system";
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/'";
vm = "vim";

View File

@ -5,6 +5,6 @@ image=~/Downloads/$host.img.zst
cd ~/.nixos/
nix build .#images.$host &&
cp result/sd-image/*.img.zst $image
nom build .#images.$host &&
cp result/sd-image/*.img.zst $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
rm ~/.config/nixpkgs/home.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
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"
if [ $reboot -eq 0 ]; then
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
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'
fi
echo

View File

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

View File

@ -5,4 +5,4 @@ export NIX_SSHOPTS="-t -i $rsa_key"
host=$1
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; [
git
nixFlakes
nix-output-monitor
python310
python310Packages.black
python310Packages.mypy