This project is archived and no longer maintained. No new features, bug fixes, or pull requests will be accepted. You are welcome to fork this repository if you'd like to continue development.
A terminal UI for managing NixOS packages across modular configuration files.
Most NixOS setups split configuration across multiple imported files. nixedit follows those imports, shows all packages in one place, and edits the correct source file when you add or remove a package.
- Multi-file support - Recursively follows
importsto discover all configuration modules - Unified package view - Aggregates
environment.systemPackagesfrom all modules - Live package search - Search nixpkgs with auto-debounce (searches after you stop typing)
- Smart insertion - Auto-detects
with pkgs;vspkgs.syntax and indentation - Module selection - Choose which configuration file to install packages into
- Duplicate detection - Warns if a package is already installed
- Safe removal - Remove packages from their source file, preserving formatting
- Rebuild integration - Automatic or manual
nixos-rebuild switchafter changes - Dry-run mode - Preview what would be built without applying changes
- Persistent settings - Preferences saved to
~/.config/nixedit/settings.json
nix build github:roamingparrot/nixos-config-manager
nix-env -i ./resultnix-build
nix-env -i ./result./build.sh
# or manually:
cd src && mkdir -p build && cd build && cmake .. && makesudo nixeditRoot privileges are required to edit /etc/nixos/ files and run nixos-rebuild.
| Key | Action |
|---|---|
a |
Add package (open search) |
d |
Mark/unmark for deletion |
w |
Save changes and rebuild |
; |
Open settings |
j/k / Arrow keys |
Navigate |
q |
Quit |
| Key | Action |
|---|---|
| Type | Enter query (auto-searches) |
j/k |
Navigate results |
| Enter | Select package |
| Escape | Cancel |
| Key | Action |
|---|---|
j/k |
Navigate modules |
| Enter | Install to module |
| Escape | Back to search |
| Key | Action |
|---|---|
j/k |
Navigate |
| Space / Enter | Toggle option |
| Escape | Save and close |
Access settings with ; from the main view. Preferences persist across sessions.
| Setting | Default | Description |
|---|---|---|
| Automatic Rebuild | On | Run nixos-rebuild switch automatically after changes |
| Dry Run | Off | Add --dry-run to preview changes without applying |
Settings are stored in ~/.config/nixedit/settings.json.
nixedit starts from /etc/nixos/configuration.nix, follows all imports, and parses environment.systemPackages blocks from each file. This gives a unified view while tracking which file each package belongs to.
# /etc/nixos/configuration.nix
{ imports = [ ./hardware-configuration.nix ./packages.nix ]; }
# /etc/nixos/packages.nix
{ environment.systemPackages = with pkgs; [ git neovim ]; }Both git and neovim appear in the TUI, attributed to packages.nix. Removing either edits only that file.
This is not a full Nix language parser. It uses pattern matching for common forms:
environment.systemPackages = with pkgs; [
git
neovim
];Dynamic expressions like someFunction pkgs or complex Nix expressions in imports are not supported.
NixOS tracks every configuration as a generation. If something goes wrong:
sudo nixos-rebuild switch --rollbackMIT