13 current 2025-10-06 22:31:54 25.05.20251001.5b5be50 6.12.49 *

This commit is contained in:
2025-10-06 22:33:14 -05:00
parent ccda763364
commit da1c31f73d

View File

@@ -4,15 +4,8 @@ pushd ~/.nix
# nvim flake.nix # nvim flake.nix
# alejandra . &>/dev/null # alejandra . &>/dev/null
# git diff -U0 *.nix # git diff -U0 *.nix
git diff -U0 $(find . -name '*.nix')
# add generation comment to flake.nix # add generation comment to flake.nix
gen=$(nixos-rebuild list-generations | grep current | awk '{print $1}')
echo "nixos rebuilding..."
sudo nixos-rebuild switch --flake ~/.nix#snowbelle &>.nixos-switch-log || (
cat .nixos-switch-log)
gen=$(nixos-rebuild list-generations | grep current) gen=$(nixos-rebuild list-generations | grep current)
if sed -n '3p' flake.nix | grep -q '^# generation:'; then if sed -n '3p' flake.nix | grep -q '^# generation:'; then
# replace the comment on line 3 # replace the comment on line 3
@@ -22,5 +15,14 @@ else
sed -i "3i# generation: $gen" flake.nix sed -i "3i# generation: $gen" flake.nix
fi fi
git diff -U0 $(find . -name '*.nix')
echo "nixos rebuilding..."
sudo nixos-rebuild switch --flake ~/.nix#snowbelle &>.nixos-switch-log || (
cat .nixos-switch-log | grep --color error && false)
git commit -am "$gen" git commit -am "$gen"
popd popd