···1919| Ubuntu (standalone HM) | `home-manager switch --flake .#ubuntu` |
2020| Raspberry Pi (standalone HM) | `home-manager switch --flake .#pi-nas` |
21212222+### Fedora host (`hosts/fedora/`)
22232424+All Fedora-specific details live in [`hosts/fedora/README.md`](hosts/fedora/README.md). Key facts an agent needs to know:
2525+2626+- **dnf/Nix split**: `wezterm` and `bubblewrap` must come from dnf (system GPU/namespace libs). Everything else comes from Nix. Do NOT move these to Nix — the binaries will fail at runtime.
2727+- **Adding packages to the Fedora host**: edit `hosts/fedora/default.nix` under `home.packages`, not the shared `home/default.nix`, unless the package is common across all Linux hosts.
2828+- **npm workaround**: Nix store is read-only for `npm install -g`. `hosts/fedora/default.nix` sets `NPM_CONFIG_PREFIX=~/.npm-global` and runs a `home.activation` script to install globals (`socket`). If adding a new npm global, add it there.
2929+- **input-remapper preset**: lives at `common/input-remapper/.config/input-remapper-2/presets/Keychron Keychron Q11/mac-mode.json`, deployed by `modules/input-remapper.nix`. The Keychron Q11's physical Alt keys are mapped to Ctrl+Shift shortcuts (macOS muscle memory).
3030+- **Bootstrap**: `./setup.sh` handles the full Fedora bootstrap (dnf pkgs, systemd enable, passwordless sudo, zsh). Running `home-manager switch --flake .#fedora` alone only applies the Nix user config.
23312432## Claude Code Configuration
2533
+2
README.md
···168168| **input-remapper** | Nix (`pkgs.input-remapper`) | Config via Nix module |
169169| **brave, CLI tools** | Nix (`home.packages`) | Pure user-level, no system deps needed |
170170171171+For a full breakdown of Fedora-specific changes (system-level, Nix-managed packages, npm activation, installed modules, and architectural notes), see [`hosts/fedora/README.md`](hosts/fedora/README.md).
172172+171173## Adding a New Config
172174173175### Option 1: Nix (preferred for macOS)
···4646 direnv
4747 gh
4848 act # run GitHub Actions locally
4949- bruno # API client
5049 _1password-cli
51505251 # Build tools
+63
hosts/fedora/README.md
···11+# Fedora host configuration
22+Standalone Home Manager configuration for Fedora Workstation.
33+44+See [main README](../../README.md#fedora) for quick start instructions.
55+66+## System-level changes (via `setup.sh`)
77+88+| Change | What it does | Why |
99+|---|---|---|
1010+| **dnf packages** | Installs `wezterm` and `bubblewrap` | These need system GPU/namespace libraries that Nix binaries can't provide |
1111+| **systemd services** | Enables `tailscaled` on boot | Tailscale binary is Nix-managed but needs systemd for auto-start |
1212+| **Passwordless sudo** | Writes `/etc/sudoers.d/10-<user>-nopasswd` | Avoids repeated password prompts during bootstrap/update |
1313+| **Default shell** | Sets zsh via `chsh` | Fish is the Fedora default; zsh is managed declaratively via Home Manager |
1414+1515+## Nix-managed packages (`default.nix`)
1616+1717+The Fedora host config manages these via Nix rather than dnf:
1818+1919+| Package | Purpose | Notes |
2020+|---|---|---|
2121+| **tailscale** | VPN/mesh networking | Binary from Nix; systemd service enabled separately |
2222+| **input-remapper** | Keyboard remapping | Preset config deployed via `modules/input-remapper.nix` |
2323+| **gcc, gnumake, openssl** | Build toolchain | Version-pinned by nixpkgs |
2424+| **libyaml, gmp** | Development libraries | For Ruby/Python builds |
2525+| **nodejs, pnpm, yarn** | JavaScript toolchain | Replaces nvm/fnm; npm prefix set to `~/.npm-global` (Nix store is read-only) |
2626+| **python3, uv** | Python toolchain | uv replaces pip/poetry |
2727+| **go** | Go development | |
2828+| **brave** | Web browser | Pure Nix build, no dnf repo needed |
2929+| **\_1password-cli** | 1Password CLI | `op` for secret management |
3030+| **lsb-release** | LSB info | Used by scripts for distro detection |
3131+3232+## Npm activation script
3333+3434+A `home.activation` script in `default.nix` runs after every `home-manager switch` to:
3535+- Create `~/.npm-global` (writable prefix; Nix store is read-only)
3636+- Install `socket` globally if not present (not packaged in nixpkgs)
3737+3838+## Installed modules
3939+4040+| Module | What it does |
4141+|---|---|
4242+| `../../modules/input-remapper.nix` | Deploys a Keychron Q11 preset (`mac-mode.json`) remapping Alt+ keys to Ctrl+Shift+ shortcuts — matches macOS muscle memory for copy/paste/terminal |
4343+| `../../modules/wezterm.nix` | Symlinks Wezterm config from `common/wezterm/`; binary is installed via dnf |
4444+| `../../modules/sandbox-repo.nix` | Provides `sandbox-repo` command — runs repos in a bubblewrap-isolated namespace with `/home` as tmpfs, network shared, all caps dropped |
4545+| `../../modules/home-manager-gc.nix` | Weekly auto-clean of old Home Manager generations (keeps 7 days) — included via `home/linux.nix` |
4646+4747+## Key architectural notes
4848+4949+- **Standalone Home Manager**: Fedora uses standalone HM (no nix-darwin/NixOS). Home Manager manages user-level configs only; system packages that can't come from Nix are installed via dnf in `setup.sh`.
5050+- **dnf/Nix split boundary**: Packages that need system libraries (EGL, namespace APIs) come from dnf. Everything else comes from Nix for version-pinning and declarative management.
5151+- **Nix-preset configs migrated**: Configs previously managed via GNU Stow (bash, direnv, gh, tmux, nvim, etc.) are now fully Nix-managed through Home Manager modules.
5252+5353+## How to apply
5454+5555+```bash
5656+# From the dotfiles root:
5757+home-manager switch --flake .#fedora
5858+```
5959+6060+For initial bootstrap (includes dnf packages and system services):
6161+```bash
6262+./setup.sh
6363+```
-1
hosts/fedora/default.nix
···54545555 # Additional tools
5656 brave # Web browser
5757- bruno # API client
5857 _1password-cli
5958 ];
6059