nixquick is a custom home-manager configuration for television channels to quickly search, install and uninstall nixpkgs across your different nix configuration files out-of-the-box in the television TUI.
It supports NixOS based systems, including both classic setups with systemPackages, Home Manager setups and flake-based setups as long as your pkgs are configured in arrays in nix config files.
Features :
- 🔎 Search and install available nix packages
- 🗑️ Search and uninstall packages installed on your machine
- ⚙️ Trigger rebuild switch optionnaly
- ✅ Support selecting, installing and uninstalling multiple packages simultaneously from different places
It's based on :
- television for customizable fuzzy search TUI
- nix-search-tv to search the available nixpkgs in the television TUI
- nix-editor to edit the nix configuration files and add/remove packages
Include the following in your home-manager nix configuration like home.nix:
let
nixquick = builtins.fetchTarball "https://github.com/gschurck/nixquick/archive/main.tar.gz";
in
{
# ...
}Use main to receive updates automatically, or use latest commit for full reproducibility:
nixquick = builtins.fetchTarball "https://github.com/gschurck/nixquick/archive/<latest_commit_hash>.tar.gz";And configure it as you want :
{
# ...
nixquick = {
enable = true;
switchCommand = "sudo nixos-rebuild switch";
username = "<your_username>";
destinations = {
"/home/<your_username>/nixos-config/configuration.nix" = [
"environment.systemPackages"
"users.users.<your_username>.packages"
];
"/home/<your_username>/nixos-config/home.nix" = [ "home.packages" ];
};
};
}Available options:
nixquick.enable: enable nixquick channels and helpersnixquick.switchCommand: optional command run by... and switchactionsnixquick.username: optional username used to inspect user and Home Manager packagesnixquick.destinations: map of config file paths to package attribute paths that nixquick can edit. The first destination attribute will be used as default one when pressingEnterorCtrl+E.
Then run sudo nixos-rebuild switch to apply the configuration.
Add nixquick as an input and import the Home Manager module from the flake output:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nixquick.url = "github:gschurck/nixquick";
};
outputs = inputs@{ nixpkgs, home-manager, nixquick, ... }: {
nixosConfigurations.my-host = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
home-manager.nixosModules.home-manager
({ ... }: {
home-manager.useGlobalPkgs = true;
home-manager.users.<your_username> = {
imports = [ nixquick.homeManagerModules.default ];
nixquick = {
enable = true;
username = "<your_username>";
flake = {
enable = true;
path = "/home/<your_username>/nixos-config";
nixosConfiguration = "my-host";
};
destinations = {
"/home/<your_username>/nixos-config/configuration.nix" = [
"environment.systemPackages"
"users.users.<your_username>.packages"
];
"/home/<your_username>/nixos-config/home.nix" = [ "home.packages" ];
};
};
};
})
];
};
};
}In a flake setup, nixquick still edits ordinary .nix module files through destinations.
The flake settings only change how nixquick evaluates the active configuration and which
default rebuild command it generates.
tv nix-packagesto search and install available nix packagestv nix-installed-packagesto search and uninstall locally configured packages
The generated Television channels now always expose both action variants:
... and switch: update the Nix file, then runswitchCommand... (edit only): update the Nix file without rebuilding
The default keybindings are:
Enter: run theswitchaction on default first destination attributeCtrl+E: run theedit onlyaction on default first destination attributeTab: select multiple packagesF7from Television to jump tonix-packagesF8from Television to jump tonix-installed-packages
This applies to both package installation and package removal.
