update for ubuntu nix
This commit is contained in:
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user