This is a unification of all the different pick NixOS tooling into one executable.
NixOS has its various tools spread out between several large scripts that have
become on the verge of unmaintainable. This tool has one goal: to create a modular
NixOS CLI that mirrors or enhances the functionality of all current NixOS tooling in
nixpkgs
, adds on to it if needed, and eventually come to replace it entirely.
nixos-rebuild
→nixos apply
+nixos generation
nixos-enter
→nixos enter
nixos-generate-config
→nixos init
nixos-version
→nixos info
nixos-install
→nixos install
nixos-info
→nixos manual
More to come in the future, see TODO for a list of commands that are planned to be implemented.
Use this repo as a flake input. A NixOS module is also provided, and this is the recommended way to use this program.
{
inputs.nixos-cli.url = "github:water-sucks/nixos";
outputs = { nixpkgs, nixos-cli, ... }: {
nixosConfigurations.system-name = nixpkgs.lib.nixosSystem {
modules = [
nixos-cli.nixosModules.nixos-cli
# other configuration goes here
];
};
};
}
This can be configured using the NixOS module (the preferred way), which
generates a file at /etc/nixos-cli/config.toml
. An absolute path to a
configuration file can also be specified using the NIXOS_CLI_CONFIG
environment variable.
A sample configuration file with all available options, along with some example
configuration is located in config.sample.toml
.
- ➖
apply
- ❌
container
- ✅
enter
- ✅
info
- ✅
init
- ➖
install
- ➖
generation
- ✅
list
- ✅
switch <number>
- ✅
rollback
- ➖
diff
(a la nvd)
- ✅
- ✅
manual
- ❌
option
- ✅
repl
I would like for this to become a standard NixOS tool, which means that I want to cater to potentially many interests. If you would like for any subcommands to be implemented that you think fit this project, please file an issue.