No description
Find a file
2026-01-06 09:34:06 -06:00
home/tom Add mediainfo for yazi 2025-12-28 21:07:13 -06:00
modules Disable esc because it messes with games 2026-01-06 09:34:06 -06:00
packages/karabiner-driverkit Automatically setup kanata and karabiner-driverkit 2025-03-15 11:00:27 -05:00
systems Fix homebrew because I forgot to push 2026-01-06 09:30:27 -06:00
.gitignore Ignore .nixd.json 2023-12-28 09:20:33 -06:00
CLAUDE.md Move Firefox fix for Darwin to firefox module 2025-03-08 09:52:34 -06:00
flake.lock Update nix-darwin 2026-01-06 09:30:56 -06:00
flake.nix Fix homebrew because I forgot to push 2026-01-06 09:30:27 -06:00
Makefile Add makefile 2025-04-09 09:04:43 -05:00
README.md Add NixOs generation cleanup 2025-12-29 14:49:12 -06:00
test.sh Disable gpu passthrough 2025-11-04 02:35:59 -06:00

Nix development machines

Instructions

Darwin

sudo softwareupdate --install-rosetta
nix --extra-experimental-features 'flakes nix-command' run nix-darwin -- switch --option eval-cache false --flake 'git+https://src.bhamops.com/tom/nix.git?ref=refactor/use-nix-darwin#goose' --refresh
chsh -s /run/current-system/sw/bin/fish␊

If nix doctor reports the following:

$ nix doctor
[FAIL] Multiple versions of nix found in PATH:
  /nix/store/49wgh2fy77pfvcrbnsr0i6mkbhdkwqr7-nix-2.21.2/bin
  /nix/store/hghqbpw1d5a2kqzjjn68wm9klqbmjvk0-nix-2.18.2/bin

[PASS] All profiles are gcroots.
[PASS] Client protocol matches store protocol.
[INFO] You are trusted by store uri: daemon

Then run this to remove root user's version of nix

sudo -i nix-env -e nix

Old

# Install nix
sh <(curl -L https://nixos.org/nix/install)

# Install and switch to Home Manager
nix run --extra-experimental-features 'nix-command flakes' 'git+https://src.bhamops.com/tom/nix#homeConfigurations.macos.activationPackage'
home-manager switch --flake "git+https://src.bhamops.com/tom/nix#macos"

Helpers

Using NH

nh home switch . -- --impure
nh darwin switch .

NixOS Generation cleanup

nixos-rebuild list-generations
sudo nix-env --delete-generations --profile /nix/var/nix/profiles/system 86 90 91
sudo nixos-rebuild switch --flake .

Darwin

Find file to set when changing 'System Preferences'

sudo fs_usage -f filesys | grep cfprefsd
```

Find plist to change
```bash
sudo fs_usage -f filesys | grep plist
```

## Good Resources
### Reference
- [nix-darwin (Official)](https://daiderd.com/nix-darwin/manual/index.html)
- [nix-dawrin (MyNixoOS)](https://mynixos.com/nix-darwin)
- [home-manager](https://home-manager-options.extranix.com/)
- [nixpkgs documentation](https://ryantm.github.io/nixpkgs/)
- [nix builtins documentation](https://nix.dev/manual/nix/latest/language/builtins)
- [MacOS settings discovery](https://rderik.com/blog/tracking-where-settings-are-stored-on-macos/)
- [Nix Glossary](https://nix.dev/manual/nix/2.22/glossary)

### Packages
- [nixhub](https://www.nixhub.io)
- [nixpkgs-ruby](https://github.com/bobvanderlinden/nixpkgs-ruby)

### Learning
- https://nixos-and-flakes.thiscute.world/introduction/

### Firefox
- https://github.com/Kreyren/nixos-config/blob/bd4765eb802a0371de7291980ce999ccff59d619/nixos/users/kreyren/home/modules/web-browsers/firefox/firefox.nix#L116-L148

### Example designs to look into
- https://github.com/drupol/nixos-x260
- https://johns.codes/blog/organizing-system-configs-with-nixos https://github.com/JRMurr/NixOsConfig/tree/main
- https://discourse.nixos.org/t/nixos-config-base-a-modularized-base-for-nixos-configs/28171/2 https://github.com/dch82/NixOS-Config-Base