aRustyDev / aRustyDev/dotfiles

Fix darwin-rebuild PATH configuration

Open
#170 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Jupyter Notebook
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

## Summary
Resolved issue where `darwin-rebuild` command was not found after installation due to PATH configuration problems.

## Problem
- `/run/current-system/sw/bin` was not in user's PATH
- Nix-Darwin configurations were using `lib.mkForce` which prevented proper PATH merging
- User's .zshrc was not able to control final PATH ordering

## Solution
1. Removed all `lib.mkForce` usage from PATH configurations in:
- `cfs.nix`
- `personal.nix`
- `seneca.nix`

2. Updated `.zshrc` to properly configure PATH after nix-daemon.sh:
```bash
# Initialize path array from current PATH
path=(${(s/:/)PATH})

# Ensure darwin-rebuild is accessible
if [[ -d /run/current-system/sw/bin ]]; then
path=('/run/current-system/sw/bin' $path)
fi
```

## Key Learning
User shell configuration should have final control over PATH ordering. Nix should provide paths but not force ordering.

## Related
- This was discovered while working on MCP server module implementation
- Solution documented in `.claude/guides/lessons-learned-nix.md`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.