Skip to content

Commit

Permalink
packages/nix-cleanup: fix remote hosts case
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada committed Sep 29, 2023
1 parent ad236b4 commit 84da6e1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/nix-cleanup/nix-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ cleanup() {
nix-collect-garbage -d
if [[ "$nixos" == 1 ]]; then
echo "[INFO] Rebuilding NixOS to remove old boot entries..."
nixos-rebuild boot
if [[ -f /etc/nixos/flake.nix ]]; then
nixos-rebuild boot
else
nixos-rebuild boot --flake github:thiagokokada/nix-configs
fi
fi
if [[ "$optimize" == 1 ]]; then
echo "[INFO] Optimizing nix store..."
Expand Down

0 comments on commit 84da6e1

Please sign in to comment.