| Crates.io | nixy-rs |
| lib.rs | nixy-rs |
| version | 0.1.0 |
| created_at | 2026-01-25 21:30:05.116067+00 |
| updated_at | 2026-01-25 21:30:05.116067+00 |
| description | Homebrew-style wrapper for Nix using flake.nix |
| homepage | |
| repository | https://github.com/yusukeshib/nixy |
| max_upload_size | |
| id | 2069606 |
| size | 2,424,887 |

Reproducible Nix packages, simple commands. Install packages with a single command, sync them across all your machines.
nixy install ripgrep # That's it. Nix made simple.
nixy manages your Nix packages through a declarative flake.nix. Unlike nix profile which lacks built-in reproducibility, nixy ensures the same packages and versions on every machine. Written in Rust for reliability and performance.
For users frustrated with Homebrew, asdf, or similar tools who want:
nixy is a package management layer on top of Nix. It doesn't replace Nix's full capabilities (dev shells, builds, NixOS) - it focuses solely on managing globally installed packages, like Homebrew does.
nixy install, nixy uninstall, nixy upgradeflake.nix + flake.lock = identical environments everywherenix develop for that)If you want Homebrew's simplicity with Nix's reproducibility for your CLI tools, nixy is for you.
nixy uses plain Nix features - no Home Manager, no NixOS, no complex setup. Your packages are defined in flake.nix at ~/.config/nixy/profiles/<name>/, built with nix build.
nixy is purely declarative - your flake.nix is the single source of truth. Unlike nix profile which maintains mutable state, nixy uses nix build --out-link to create a symlink (~/.local/state/nixy/env) pointing to your built environment. This means:
flake.nix is exactly what's installednixy edits the flake.nix and runs standard nix commands. The flake.nix it generates is plain Nix - you can read it, edit it manually, or use nix commands directly anytime.
nixy is not a replacement for nix profile - it's a complement that adds reproducibility.
nix profile is great for quick, single-machine package management. nixy adds a declarative layer on top of Nix for when you need:
flake.nix to a new machine, run nixy sync, doneflake.nix is designed for gitnixy and nix profile use separate paths (~/.local/state/nixy/env vs ~/.nix-profile) and don't interfere with each other. Use nix profile for quick experiments, nixy for your reproducible base environment - or use both together.
nixy uses profiles to organize packages. A "default" profile is created automatically on first use. You can create additional profiles later for different contexts (work, personal, projects).
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
Quick install (recommended):
curl -fsSL https://raw.githubusercontent.com/yusukeshib/nixy/main/install.sh | bash
This will try (in order): pre-built binary, cargo install, or nix build.
With cargo:
cargo install --git https://github.com/yusukeshib/nixy.git
With nix:
nix profile install github:yusukeshib/nixy
From source:
git clone https://github.com/yusukeshib/nixy.git
cd nixy
cargo build --release
cp target/release/nixy ~/.local/bin/
Add to your shell config (.bashrc, .zshrc, etc.):
eval "$(nixy config zsh)"
For fish, add to ~/.config/fish/config.fish:
nixy config fish | source
nixy install ripgrep # First run auto-creates the default profile
nixy install nodejs
nixy install git
nixy list # See what's installed
nixy search python # Find packages
nixy uninstall nodejs # Remove a package
nixy upgrade # Upgrade all inputs
nixy upgrade nixpkgs # Upgrade only nixpkgs
Packages are installed globally and available in all terminal sessions.
| Command | Description |
|---|---|
nixy install <pkg> |
Install a package from nixpkgs |
nixy install --from <flake> <pkg> |
Install from a flake (registry name or URL) |
nixy uninstall <pkg> |
Uninstall a package |
nixy list |
List packages in flake.nix |
nixy search <query> |
Search for packages |
nixy upgrade [input...] |
Upgrade all inputs or specific ones |
nixy sync |
Build environment from flake.nix (for new machines) |
nixy gc |
Clean up old package versions |
nixy config <shell> |
Output shell config (for PATH setup) |
nixy version |
Show nixy version |
nixy profile |
Show current profile |
nixy profile switch <name> |
Switch to a different profile |
nixy profile switch -c <name> |
Create and switch to a new profile |
nixy profile list |
List all profiles |
nixy profile delete <name> |
Delete a profile (requires --force) |
Maintain separate package sets for different contexts (work, personal, projects):
nixy profile switch -c work # Create and switch to a new profile
nixy install slack terraform # Install work-specific packages
nixy profile switch -c personal # Create another profile
nixy install spotify games # Different packages here
nixy profile list # See all profiles
nixy profile # Show current profile
Each profile has its own flake.nix at ~/.config/nixy/profiles/<name>/. Switching profiles rebuilds the environment symlink to point to that profile's packages.
Use cases:
Managing profiles with dotfiles:
# Back up all profiles to dotfiles
cp -r ~/.config/nixy/profiles ~/dotfiles/nixy-profiles
# On a new machine, restore and sync
cp -r ~/dotfiles/nixy-profiles ~/.config/nixy/profiles
nixy profile switch work # Switch to desired profile
nixy sync # Build the environment
Your package list is just a text file. Back it up, version control it, or sync it with dotfiles:
# Back up your package list (default profile)
cp ~/.config/nixy/profiles/default/flake.nix ~/dotfiles/
# On a new machine:
mkdir -p ~/.config/nixy/profiles/default
cp ~/dotfiles/flake.nix ~/.config/nixy/profiles/default/
nixy sync # Installs everything from flake.nix
Same packages, same versions, on every machine.
How do I find the right package name?
Use nixy search <keyword>. Package names sometimes differ from what you expect (e.g., ripgrep not rg).
Where are packages actually installed?
In the Nix store (/nix/store/). nixy builds a combined environment and creates a symlink at ~/.local/state/nixy/env pointing to it. The nixy config command sets up your PATH to include this location.
Can I edit the flake.nix manually? Yes! nixy provides custom markers where you can add your own inputs, packages, and paths that will be preserved during regeneration:
# [nixy:custom-inputs]
my-overlay.url = "github:user/my-overlay";
# [/nixy:custom-inputs]
Any content outside these markers will be overwritten when nixy regenerates the flake. For heavy customization, see "Customizing flake.nix" in the Appendix.
How do I update nixy?
Rebuild from source or run cargo install --git https://github.com/yusukeshib/nixy.git --force.
How do I uninstall nixy?
Delete the nixy binary (typically /usr/local/bin/nixy or ~/.cargo/bin/nixy). Your flake.nix files remain and work with standard nix commands.
Why not use nix profile directly?
nix profile lacks built-in reproducibility - there's no official way to export your packages and recreate the same environment on another machine. nixy uses flake.nix as the source of truth, which can be copied, version-controlled, and shared.
nixy provides custom markers where you can add your own content that will be preserved when nixy regenerates the flake:
Custom inputs - Add your own flake inputs:
# [nixy:custom-inputs]
my-overlay.url = "github:user/my-overlay";
home-manager.url = "github:nix-community/home-manager";
# [/nixy:custom-inputs]
Custom packages - Add custom package definitions:
# [nixy:custom-packages]
my-tool = pkgs.writeShellScriptBin "my-tool" ''echo "Hello"'';
patched-app = pkgs.app.overrideAttrs { ... };
# [/nixy:custom-packages]
Custom paths - Add extra paths to the buildEnv:
# [nixy:custom-paths]
my-tool
patched-app
# [/nixy:custom-paths]
If you edit content outside these markers, nixy will warn you before overwriting:
Warning: flake.nix has modifications outside nixy markers.
Use --force to proceed (custom changes will be lost).
If you already manage your own flake.nix and want to use nixy's package list, you can import it:
{
inputs.nixy.url = "path:~/.config/nixy";
outputs = { self, nixpkgs, nixy }: {
# nixy.packages.<system>.default is a buildEnv with all nixy packages
# You can use it as a dependency or merge it with your own environment
};
}
This way, nixy manages your package list while you maintain full control of your flake.
nixy and nix profile use separate paths and don't conflict:
~/.local/state/nixy/env/bin~/.nix-profile/binIf you have both in your PATH, the one listed first takes precedence for packages installed in both. You can use both tools for different purposes.
Install packages from any flake using --from:
# Direct flake URL
nixy install --from github:nix-community/neovim-nightly-overlay neovim
# Or use nix registry names
nixy install --from nixpkgs hello
The flake is added as a custom input to your flake.nix, and the full URL is stored for reproducibility. This works with any flake that exports packages.
Install packages from custom nix files:
nixy install --file my-package.nix
Format for my-package.nix:
{
name = "my-package";
inputs = { overlay-name.url = "github:user/repo"; };
overlay = "overlay-name.overlays.default";
packageExpr = "pkgs.my-package";
}
| Path | Description |
|---|---|
~/.config/nixy/profiles/<name>/flake.nix |
Profile packages |
~/.config/nixy/active |
Current active profile name |
~/.config/nixy/profiles/<name>/packages/ |
Custom package definitions for profile |
~/.local/state/nixy/env |
Symlink to built environment (add bin/ to PATH) |
~/.config/nixy/flake.nix |
Legacy location (auto-migrated to default profile) |
| Variable | Default | Description |
|---|---|---|
NIXY_CONFIG_DIR |
~/.config/nixy |
Location of global flake.nix |
NIXY_ENV |
~/.local/state/nixy/env |
Symlink to built environment |
nixy search to find exact names)# Build
cargo build --release
# Run tests
cargo test
# Run with debug output
RUST_LOG=debug cargo run -- install hello
MIT