apt-like CLI to manage NixOS packages from the terminal — no more manual editing of config.nix.
nixpm install neovim ripgrep # like apt install
nixpm remove htop # like apt remove
nixpm search spotify # search nixpkgs
nixpm list # list installed packagesNixOS is declarative, which is great — but editing config.nix by hand every time you want a new package gets old fast. nixpm wraps that workflow into a single command, handles the rebuild, and keeps a backup in case something goes wrong.
git clone git@github.com:OpenCz/nixpm.git
cd nixpm
sudo cp nix-pkg.py /usr/local/bin/nixpm
sudo chmod +x /usr/local/bin/nixpmRequires Python 3.10+ (already on your system if you're on NixOS).
nixpm install <package>
nixpm install neovim ripgrep bat # multiple at onceAdds the package(s) to environment.systemPackages in /etc/nixos/config.nix and runs nixos-rebuild switch.
nixpm remove <package>
nixpm rm neovim ripgrepnixpm list
nixpm lsnixpm search <term>
nixpm s firefoxnixpm install neovim --no-rebuildEdits the config without triggering a rebuild. Useful when batching multiple changes.
- Parses the
environment.systemPackagesblock in yourconfig.nix - Creates a backup at
config.nix.bakbefore any change - Adds / removes the requested packages
- Asks for confirmation
- Runs
sudo nixos-rebuild switch
- NixOS with a
config.nixat/etc/nixos/config.nix - Python 3.10+
sudoaccess