update for ubuntu nix

This commit is contained in:
2026-01-07 19:40:06 +01:00
parent 362f65c384
commit 7564dffa83
11 changed files with 166 additions and 23 deletions

View File

@@ -5,11 +5,13 @@ set -e
HOST=$(hostname)
FLAKE_PATH="${HOME}/nixConfig"
nix-channel --update
echo "🔁 Rebuilding system for host: $HOST"
sudo nixos-rebuild switch --flake "$FLAKE_PATH#$HOST"
echo "🧹 Collecting garbage..."
sudo nix-collect-garbage -d
sudo nix-collect-garbage --delete-older-than 15d
nix store gc
echo "✅ System rebuilt and cleaned."