Homebrew has been with me since my early days on macOS. brew install, brew search, brew upgrade, and everything just works. So why change? Because my machine has become the only part of my environment that I don’t describe in code.
My infrastructure is declared in Terraform, my Ansible roles are versioned, my Kubernetes deployments are manifests. But my workstation remains the result of an accumulation of brew install commands with no reliable trace. Nix fixes this problem: my package list becomes a text file, versionable, reproducible on any Mac with a single command.
This article is both a feedback report and a procedure: understand what Nix is, retrieve your Homebrew package inventory, install Nix on macOS with home-manager, then uninstall brew.
Nix, nixpkgs, NixOS: three different things for the same philosophy#
The three terms are often confused, so let’s clarify.
Nix
is a package manager, just like apt or Homebrew, but with a radically different philosophy: each package is built in isolation and stored in /nix/store under a path containing the hash of all its dependencies. Two versions of the same software coexist without conflict. Nix works on Linux and macOS on x86_64 (AMD64) and aarch64 (ARM64) architectures.
nixpkgs is the package repository used by Nix. With over 140,000 packages, it is the largest repository in the free software ecosystem, ahead of Arch Linux’s AUR and far ahead of Homebrew’s roughly 7,000 formulae. It follows a semi-annual stable release cycle: the current stable version is 26.05, released in May 2026.
NixOS is a Linux distribution built entirely around Nix: the complete system (kernel, services, users, networking) is described in a configuration file. It is the logical culmination of this approach, but that’s not the topic here: on a Mac, we use Nix as a package manager on top of macOS, not NixOS.
The ultimate goal of all this is to be able to declare your packages in a file, and install them reproducibly on any system.
What Nix really implies#
Before you dive in, let’s be honest: Nix is complicated. Not the installation or daily usage, but the mental model and the language.
Nix does not respect the FHS. The Filesystem Hierarchy Standard (/usr/bin, /usr/lib, /etc…) is ignored. Everything lives in /nix/store/<hash>-<name>-<version>/, and symbolic links expose the binaries in your user profile. Direct consequence: a downloaded binary that expects to find its libraries in /usr/lib won’t work in a pure Nix environment. On macOS this is less painful than on Linux (the base system remains intact), but keep it in mind.
The Nix language has a real learning curve. It’s a functional, lazy language with a syntax that disorients. To install a list of packages, you’ll barely see it. To package your own software or override an existing package, expect several evenings of documentation.
The documentation is fragmented. Between the official manual, the community wiki, blogs, and example repositories, finding the “right” way to do things requires sorting. The ecosystem evolves fast and many tutorials are outdated.
What you gain in return:
- A declarative environment: your package list is a file, versionable in Git
- Native rollbacks: each change creates a generation, roll back with a single command
- Reproducibility: the same file produces the same environment on another Mac or a Linux server
- Isolated development environments per project with
nix-shell, without polluting the system
| When is Nix relevant? | When brew is enough |
|---|---|
| you manage multiple machines | you have a single Mac |
| you want to rebuild your workstation quickly | about a dozen packages |
| you already practice infrastructure as code | no desire to learn a functional language to install wget |
| you need reproducible development environments |
Retrieving your Homebrew inventory#
First step, before touching anything: back up your package list.
# Explicitly installed packages (without dependencies)
brew leaves > ~/brew-formulae.txt
# GUI applications installed via cask
brew list --cask > ~/brew-casks.txt
# Full backup in Brewfile format, for safety
brew bundle dump --file=~/Brewfilebrew leaves is the important command: it only lists the packages you explicitly requested, not the dependencies pulled in automatically. This is the list you’ll translate into Nix packages. The Brewfile serves as a safety net: if the migration goes wrong, brew bundle install restores everything.
For each package in the list, check its equivalent in nixpkgs on search.nixos.org
. In the vast majority of cases, the name is identical (go, hugo, jq, kubectl). A few classic pitfalls: awscli becomes awscli2, some packages are prefixed or grouped differently.
Installing Nix on macOS: two installers#
Since January 2026, the landscape has changed. The Determinate Systems installer, long recommended by the community, now only installs Determinate Nix, their downstream distribution with locked configuration and custom features. In response, the NixOS community working group forked this installer to offer an equivalent that installs upstream Nix.
| Community installer (NixOS) | Determinate Nix | |
|---|---|---|
| Nix installed | Upstream (official) | Downstream distribution |
| Configuration | Free (/etc/nix/nix.conf) | Locked, override via nix.custom.conf |
| Flakes | Optional (--enable-flakes) | Enabled and enforced |
| Uninstall | nix-installer uninstall | nix-installer uninstall |
| Target | Standard community usage | Enterprises, commercial support |
Since I don’t use flakes and want to stay on official Nix, I choose the community installer:
curl -sSfL https://artifacts.nixos.org/nix-installer | sh -s -- installThe installer creates a dedicated APFS volume for /nix, configures the daemon and build users. It survives major macOS updates, which was the historical weak point of installing Nix on Mac. Here’s the output on my machine:
$ curl -sSfL https://artifacts.nixos.org/nix-installer | sh -s -- install
info: downloading installer
INFO nix-installer v2.34.6
`nix-installer` needs to run as `root`, attempting to escalate now via `sudo`...
Password:
INFO nix-installer v2.34.6
Welcome to the Nix installer!
Flakes are an experimental feature, but widely used in the community.
You can change this later in `/etc/nix/nix.conf`.
Enable flakes?
Proceed? ([Y]es/[n]o): n
Note: the experimental nix-command feature has been enabled.
Commands starting with `nix ` (e.g. `nix build`) are subject to interface changes.
Nix install plan (v2.34.6)
Planner: macos (with default settings)
Planned actions:
* Create an APFS volume `Nix Store` for Nix on `disk3` and add it to `/etc/fstab` mounting on `/nix`
* Unpack embedded Nix 2.34.6 to `/nix/temp-install-dir`
* Create a directory tree in `/nix`
* Synchronize /nix/var ownership
* Move the downloaded Nix into `/nix`
* Synchronize /nix/store ownership
* Create build users (UID 351-382) and group (GID 350)
* Configure Time Machine exclusions
* Setup the default Nix profile
* Place the Nix configuration in `/etc/nix/nix.conf`
* Configure the shell profiles
* Configuring zsh to support using Nix in non-interactive shells
* Create a `launchctl` plist to put Nix into your PATH
* Configure upstream Nix daemon service
* Remove directory `/nix/temp-install-dir`
Proceed? ([Y]es/[n]o/[e]xplain): y
INFO Step: Create an APFS volume `Nix Store` for Nix on `disk3` and add it to `/etc/fstab` mounting on `/nix`
INFO Step: Provision Nix
INFO Step: Create build users (UID 351-382) and group (GID 350)
INFO Step: Configure Time Machine exclusions
INFO Step: Configure Nix
INFO Step: Configuring zsh to support using Nix in non-interactive shells
INFO Step: Create a `launchctl` plist to put Nix into your PATH
INFO Step: Configure upstream Nix daemon service
INFO Step: Remove directory `/nix/temp-install-dir`
INFO Waiting up to 10s for Nix daemon socket
INFO Running self test for shell sh
INFO Running self test for shell bash
INFO Running self test for shell zsh
Nix was installed successfully!
To get started using Nix, open a new shell or run `. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh`Open a new terminal, run the following command . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh (or open a new terminal as suggested) and verify that the nix command is available: nix --version.
Configuring home-manager#
Nix alone allows you to install packages imperatively (nix-env -iA), but that would miss the point. home-manager brings the declarative layer: a home.nix file describes your packages and dotfiles, a single command applies everything.
Add the stable nixpkgs channel for Darwin and home-manager, with aligned versions:
# Stable nixpkgs channel for macOS
nix-channel --add https://nixos.org/channels/nixpkgs-26.05-darwin nixpkgs
# Corresponding home-manager channel
nix-channel --add https://github.com/nix-community/home-manager/archive/release-26.05.tar.gz home-manager
nix-channel --updateVersion alignment is mandatory: home-manager release-26.05 with nixpkgs 26.05. A mismatch produces warnings or even errors. On my machine, here’s the result:
nix-channel --add https://nixos.org/channels/nixpkgs-26.05-darwin nixpkgs
nix-channel --add https://github.com/nix-community/home-manager/archive/release-26.05.tar.gz home-manager
nix-channel --update
this derivation will be built:
/nix/store/71286qwagzrzkl1pj75qsmqwjadlbi7c-home-manager-26.05.tar.gz.drv
building '/nix/store/71286qwagzrzkl1pj75qsmqwjadlbi7c-home-manager-26.05.tar.gz.drv'...
unpacking 2 channels...Install home-manager:
# the following command generates the file "~/.config/home-manager/home.nix",
# which will replace your history of "brew install".
# the command looks "weird" with the '<home-manager>' but it's the correct nix syntax
nix-shell '<home-manager>' -A installDepending on your machine’s power, this command may take a few minutes. Here’s my result:
...
Starting Home Manager activation
Activating checkAppManagementPermission
Activating checkFilesChanged
Activating checkLinkTargets
Activating writeBoundary
Activating installPackages
installing 'home-manager-path'
building '/nix/store/n1hchpca0vhivdqjpj5xjl20fsc7m94p-user-environment.drv'...
Activating linkGeneration
Creating home file links in /Users/jh
Activating copyApps
setting up ~/Applications/Home Manager Apps...
Activating onFilesChange
Activating setupLaunchAgents
this derivation will be built:
/nix/store/9w9kjz97kirav8g4vxcgwq42mv7x59kf-hm-news.json.drv
building '/nix/store/9w9kjz97kirav8g4vxcgwq42mv7x59kf-hm-news.json.drv'...
All done! The home-manager tool should now be installed and you can edit
/Users/jh/.config/home-manager/home.nix
to configure Home Manager. Run 'man home-configuration.nix' to
see all available options.Declaring your packages#
Here’s my home.nix, to be adapted with your own list from brew leaves:
{ config, pkgs, ... }:
{
home.username = "jh";
home.homeDirectory = "/Users/jh";
# State version: do not change after initial installation
home.stateVersion = "26.05";
# Package list, declarative equivalent of brew leaves
home.packages = with pkgs; [
go
hugo
kubectl
];
# home-manager manages itself
programs.home-manager.enable = true;
}Apply the configuration:
home-manager switchEach switch creates a new generation. If something goes wrong:
# List generations
home-manager generations
# Roll back to the previous generation
home-manager switch --rollbackThis is where the difference with brew becomes concrete: adding a package means adding a line in a file and running switch again. The file goes into Git. A new Mac is configured in three commands: installer, two channels, home-manager switch.
The limitation: some GUI applications#
Let’s be clear about the weak point. Homebrew casks (VLC, Zen, OrbStack…) don’t all have an equivalent in nixpkgs on macOS. Some GUI applications are packaged there, but the integration (automatic updates, signing, placement in /Applications) remains inferior to what casks offer. For VLC, the package is built exclusively for Linux systems:
error: Refusing to evaluate package 'vlc-3.0.23-2' in /nix/store/3wq8jm2hlpwd6xnwyrbj55sgh3cbxq0a-nixpkgs-26.05-darwin/nixpkgs/pkgs/by-name/vl/vlc/package.nix:315 because it is not available on the requested hostPlatform:
hostPlatform.system = "aarch64-darwin"
package.meta.platforms = [
"aarch64-linux"
"arc-linux"
"armv5tel-linux"
"armv6l-linux"
"armv7a-linux"
"armv7l-linux"
"i686-linux"
"loongarch64-linux"
"m68k-linux"
"sh4-linux"
"microblaze-linux"
"microblazeel-linux"
"mips-linux"
"mips64-linux"
"mips64el-linux"
"mipsel-linux"
"powerpc-linux"
"powerpc64-linux"
"powerpc64le-linux"
"riscv32-linux"
"riscv64-linux"
"s390-linux"
"s390x-linux"
"x86_64-linux"
]When this kind of error appears, there are three pragmatic options:
- Download the few GUI applications directly from their website (most self-update)
- Keep a minimal brew solely for casks, and Nix for all CLI tools
- Use nixpkgs GUI packages when they exist and accept the compromises
I chose the first option: my GUI applications can be counted on one hand and update themselves. Everything else, meaning the bulk of my tooling, goes through Nix.
“Unfree” licenses#
Some applications have a non-free license: they are present in nixpkgs, but Nix refuses to evaluate them by default. This is the case for claude-code, the command-line coding agent developed by Anthropic. The following error will appear for affected packages: error: Refusing to evaluate package 'claude-code-2.1.187' in /nix/store/3wq8jm2hlpwd6xnwyrbj55sgh3cbxq0a-nixpkgs-26.05-darwin/nixpkgs/pkgs/by-name/cl/claude-code/package.nix:92 because it has an unfree license ('unfree')
To install these applications, you need to add this line to your Nix configuration file, at the beginning of the file (no official convention):
{ config, pkgs, ... }:
{
nixpkgs.config.allowUnfree = true;
# ...
}Migrating applications from brew to nix#
Before diving headfirst into the migration, it’s important to test a few applications with nix to verify everything works as expected. Based on the application list you generated earlier, you can start by migrating the least used or least sensitive applications. For my part, I’ll start by migrating go, hugo, and kubectl, the ones already declared above in my home.nix. I uninstall the brew-installed versions and install them via home-manager.
# Uninstall brew-installed versions
$ brew uninstall go hugo kubectl
Error: Refusing to uninstall /opt/homebrew/Cellar/go/1.26.4
because it is required by golangci-lint and gosec, which are currently installed.
You can override this and force removal with:
brew uninstall --ignore-dependencies go hugo kubectl
$ brew uninstall golangci-lint gosec go hugo kubectl
Uninstalling /opt/homebrew/Cellar/golangci-lint/2.12.2... (11 files, 43.3MB)
Uninstalling /opt/homebrew/Cellar/gosec/2.27.1... (6 files, 40.4MB)
Uninstalling /opt/homebrew/Cellar/go/1.26.4... (14,961 files, 228.6MB)
Uninstalling /opt/homebrew/Cellar/hugo/0.163.3... (54 files, 91MB)
Uninstalling /opt/homebrew/Cellar/kubernetes-cli/1.36.2... (261 files, 62.5MB)
# Add packages to home-manager
$ vim /Users/jh/.config/home-manager/home.nix
...
home.packages = with pkgs; [
go
hugo
kubectl
];
...
# And run home-manager again
$ home-manager switch
these 7 derivations will be built:
/nix/store/lf5850p7rx4wv461yh07dshxv4hqhd2z-home-manager-path.drv
/nix/store/rncjx9gnxydc93pk99n5l0yk1cbj8wi9-home-manager-fonts.drv
/nix/store/svzzl4ggv97m4gp9kd6ccbc1n4z8qich-hm_LibraryFonts.homemanagerfontsversion.drv
/nix/store/qqp8h0pab3cbz61j311nfbjbjcynwdgw-home-manager-files.drv
/nix/store/ndp6fp78vwj9va3rh1z769583hi9xs4r-home-manager-applications.drv
/nix/store/z36d7w0yfn5ncc3xqnk41i95knv65h9p-activation-script.drv
/nix/store/3hmgp3blqif3jjqi3j1sqgf26wfjs9d1-home-manager-generation.drv
these 5 paths will be fetched (90.7 MiB download, 351.7 MiB unpacked):
/nix/store/kyai650rrywrzflnwda9mbk2c2j9w68r-go-1.26.4
/nix/store/fcwjn7a1j8qiqabrjdg1pkd84m5hk0yv-hugo-0.161.1
/nix/store/cw9mvab1gwgd0lrbf6m026dwa7q843rm-iana-etc-20251215
/nix/store/5ffkf9jl4q5j8lc0hnjbzc8z0z13k2v0-kubectl-1.36.2
/nix/store/xkfjvrsbdm163clwd08ncqfkgsrdzad6-kubectl-1.36.2-man
copying path '/nix/store/xkfjvrsbdm163clwd08ncqfkgsrdzad6-kubectl-1.36.2-man' from 'https://cache.nixos.org'...
copying path '/nix/store/cw9mvab1gwgd0lrbf6m026dwa7q843rm-iana-etc-20251215' from 'https://cache.nixos.org'...
copying path '/nix/store/5ffkf9jl4q5j8lc0hnjbzc8z0z13k2v0-kubectl-1.36.2' from 'https://cache.nixos.org'...
copying path '/nix/store/fcwjn7a1j8qiqabrjdg1pkd84m5hk0yv-hugo-0.161.1' from 'https://cache.nixos.org'...
copying path '/nix/store/kyai650rrywrzflnwda9mbk2c2j9w68r-go-1.26.4' from 'https://cache.nixos.org'...
building '/nix/store/ndp6fp78vwj9va3rh1z769583hi9xs4r-home-manager-applications.drv'...
building '/nix/store/rncjx9gnxydc93pk99n5l0yk1cbj8wi9-home-manager-fonts.drv'...
building '/nix/store/lf5850p7rx4wv461yh07dshxv4hqhd2z-home-manager-path.drv'...
structuredAttrs is enabled
created 0 symlinks in user environment
structuredAttrs is enabled
created 0 symlinks in user environment
building '/nix/store/svzzl4ggv97m4gp9kd6ccbc1n4z8qich-hm_LibraryFonts.homemanagerfontsversion.drv'...
structuredAttrs is enabled
created 175 symlinks in user environment
building '/nix/store/z36d7w0yfn5ncc3xqnk41i95knv65h9p-activation-script.drv'...
building '/nix/store/qqp8h0pab3cbz61j311nfbjbjcynwdgw-home-manager-files.drv'...
building '/nix/store/3hmgp3blqif3jjqi3j1sqgf26wfjs9d1-home-manager-generation.drv'...
/nix/store/l9405c663fv27ycihrr01m4g9zly2hp4-home-manager-generation
Starting Home Manager activation
Activating checkAppManagementPermission
Activating checkFilesChanged
Activating checkLinkTargets
Activating writeBoundary
Activating installPackages
replacing old 'home-manager-path'
installing 'home-manager-path'
building '/nix/store/w53ig4i0kbl8z4i15d15xbmw222axds4-user-environment.drv'...
Activating linkGeneration
Cleaning up orphan links from /Users/jh
Creating home file links in /Users/jh
Activating copyApps
setting up ~/Applications/Home Manager Apps...
Activating onFilesChange
Activating setupLaunchAgentsAnd to install a specific version?#
For example, to install a specific version of go:
$ nix-env -qaP go
nixpkgs.go_1_25 go-1.25.11
nixpkgs.go go-1.26.4
nixpkgs.texlivePackages.go go-78116
# Edit your home.nix file and add the package name
$ vim /Users/jh/.config/home-manager/home.nix
...
home.packages = with pkgs; [
go_1_25
hugo
kubectl
];
...
# Then apply the changes
$ home-manager switchAnd to install even older versions that are unavailable in the nixpkgs 26.05 index? That’s more complicated. I haven’t had the time to dig into this question yet, nor felt the need.
Cleaning up to avoid disk saturation#
Every time you run home-manager switch, Nix creates a new generation of your environment. To avoid disk saturation, you can remove old generations:
$ home-manager generations
2026-07-05 15:36 : id 10 -> /nix/store/jm4g9jrxjjiv39yb24c98ihzpyll0gnc-home-manager-generation (current)
2026-07-05 15:27 : id 9 -> /nix/store/rqx8xiwn35z7y239pnjpzvpbjm916bxi-home-manager-generation
2026-07-05 15:25 : id 8 -> /nix/store/kxx9ky1yrkva9gd3gzmxk2jqlaja2gp6-home-manager-generation
2026-07-05 15:18 : id 7 -> /nix/store/3sz5l00q41kfv2mmdvlcib6n8c0xhwgn-home-manager-generation
2026-07-05 14:46 : id 6 -> /nix/store/wh8ycdkvd3xpi5va3xmc8zla93r3fgin-home-manager-generation
2026-07-05 14:43 : id 5 -> /nix/store/mkbl59xwvzd3yd3x54sl9lsfxwxqf7l6-home-manager-generation
2026-07-05 14:41 : id 4 -> /nix/store/p35dv7cjhslmdzkyg04fk8wh798kb50n-home-manager-generation
2026-07-05 14:37 : id 3 -> /nix/store/2203f2cn3aszn7x5icbp60qakrx8x0rd-home-manager-generation
2026-07-05 14:12 : id 2 -> /nix/store/l9405c663fv27ycihrr01m4g9zly2hp4-home-manager-generation
2026-07-05 13:48 : id 1 -> /nix/store/f6aygwjxr2vl2xb2rr21wp7lz2y0qkkr-home-manager-generationYou can remove generations by their id, using the command home-manager remove-generations 1 2 3 4:
home-manager remove-generations 1 2 3 4
Removing generation 1
Removing generation 2
Removing generation 3
Removing generation 4
home-manager generations
2026-07-05 15:36 : id 10 -> /nix/store/jm4g9jrxjjiv39yb24c98ihzpyll0gnc-home-manager-generation (current)
2026-07-05 15:27 : id 9 -> /nix/store/rqx8xiwn35z7y239pnjpzvpbjm916bxi-home-manager-generation
2026-07-05 15:25 : id 8 -> /nix/store/kxx9ky1yrkva9gd3gzmxk2jqlaja2gp6-home-manager-generation
2026-07-05 15:18 : id 7 -> /nix/store/3sz5l00q41kfv2mmdvlcib6n8c0xhwgn-home-manager-generation
2026-07-05 14:46 : id 6 -> /nix/store/wh8ycdkvd3xpi5va3xmc8zla93r3fgin-home-manager-generation
2026-07-05 14:43 : id 5 -> /nix/store/mkbl59xwvzd3yd3x54sl9lsfxwxqf7l6-home-manager-generationIn addition to removing obsolete generations, you need to purge the nix cache and deduplicate it:
nix-collect-garbage
nix store optimiseImportant! Do not run nix-collect-garbage without first removing obsolete generations: if you don’t, no space will be freed, since each generation still has a symbolic link to the packages it contains.
Always keep at least three generations so you can roll back if something goes wrong. Feel free to keep as many as you want.
ZSH and its extensions#
I use ZSH with the following extensions:
- native zsh completion (
compinit), enabled viaenableCompletion zsh-autosuggestions: command suggestions based on historyzsh-syntax-highlighting: syntax highlighting for commands
Rather than installing them manually, I used home-manager to manage them via the home.nix file. Zsh extensions are not added as regular packages, but through specific home-manager modules. However, since I had already installed zsh and extensions, I consequently already have a customized working environment. You need to run home-manager switch -b backup to enable backup of files that will be overwritten by the nix-managed extension installation:
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
};With this configuration block, it’s no longer necessary to have the zsh package in the home.packages = with pkgs; list. The programs.zsh block will implicitly handle the installation, like a dependency.
The old customized zsh configuration (aliases, functions, etc.) is preserved with the .backup extension. And what about the environment variables that were added in the .zshrc file? You need to add them to the home.nix file via the home.sessionVariables property, for all the variables you had.
Conclusion#
The migration took me two hours, including one hour checking package name correspondences. Daily life is now simpler than with brew: one file, one command, rollbacks. The real cost is not the migration but learning the Nix model — and it’s only just beginning: nix-shell per project, custom packaging, and maybe one day NixOS on a homelab server. If your Mac is your work tool and you already practice infrastructure as code, it’s worth it. Otherwise, brew does the job perfectly well.
A few packages either don’t have the same names in nixpkgs as in brew, or are simply not available in nixpkgs. For edge-case packages, installation was done via the project’s official installer. I’m fully aware that this goes against the spirit of Nix, but I preferred a quick and functional migration over an exhaustive search for alternative solutions. In the end, I’m happy and at peace with this migration; from now on, nothing changes without me knowing, and it’s reusable on any machine, as long as it has nix.
The home.nix file#
Here’s the home.nix file I used to configure my environment. Warning: never put real tokens in plain text in this file if it’s meant to be versioned in Git — use a secret manager like sops with age (both present in the list below):
{ config, pkgs, ... }:
{
nixpkgs.config.allowUnfree = true;
home.username = "jh";
home.homeDirectory = "/Users/jh";
home.stateVersion = "26.05"; # Please read the comment before changing.
home.packages = with pkgs; [
age
ansible-lint
btop
bun
cilium-cli
claude-code
discord
ffmpeg
gh
git
go
golangci-lint
gosec
hugo
k9s
kubectl
kubernetes-helm
jq
net-news-wire
nodejs
opencode
opentofu
python3
restic
rtk
rsync
sops
talosctl
tree
typescript
typescript-language-server
vscodium
yamllint
zed-editor
zsh-powerlevel10k
];
home.file.".p10k.zsh".source = ./dotfiles/p10k.zsh;
home.sessionVariables = {
CR_PAT = "redacted";
GITHUB_PERSONAL_ACCESS_TOKEN = "redacted";
SOPS_AGE_KEY_FILE = "/Users/jh/.sops/key.txt";
};
home.sessionPath = [
"$HOME/.local/bin"
"$HOME/.lmstudio/bin"
"$HOME/.codeium/windsurf/bin"
];
programs.home-manager.enable = true;
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
oh-my-zsh = {
enable = true;
theme = "robbyrussell";
plugins = [
"git"
"sudo"
"kubectl"
];
};
# For the p10klevel config file, create a folder,
# do the first init and move the file into this folder
# mkdir -p ~/.config/home-manager/dotfiles
# mv ~/.p10k.zsh ~/.config/home-manager/dotfiles/p10k.zsh
initContent = ''
source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme
source ~/.p10k.zsh
'';
shellAliases = {
k = "kubectl";
ls = "ls -lath";
rm = "rm -i";
terraform = "tofu";
};
};
}