Skip to content

Commit

Permalink
scripts(nix-setup): Disable Nix dirty git tree warning
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomSpaceship authored and DingoOz committed Jan 6, 2025
1 parent 71f5940 commit 8a923ed
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions software/scripts/nix-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ else
RESTART_NIX_DAEMON=true
fi

DISABLE_WARN_DIRTY="warn-dirty = false"
if grep -Fq "$DISABLE_WARN_DIRTY" /etc/nix/nix.conf; then
echo "Dirty git tree warning already disabled!"
else
echo "Disabling dirty git tree warning..."
echo "$DISABLE_WARN_DIRTY" | sudo tee -a /etc/nix/nix.conf
RESTART_NIX_DAEMON=true
fi

# restart Nix daemon so above changes take effect - but only if needed
if [ "${RESTART_NIX_DAEMON:-}" = true ]; then
echo "Restarting nix daemon"
Expand Down

0 comments on commit 8a923ed

Please sign in to comment.