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.json
. I would prefer using TOML at
some point, but for right now JSON is the file format I can get up and running
with the fastest.
- ➖
apply
- ❌
container
- ❌
list
- ❌
create <name>
- ❌
destroy <name>
- ❌
start <name>
- ❌
stop <name>
- ❌
status <name>
- ❌
update <name>
- ❌
login <name>
- ❌
run <name> <args...>
- ❌
show-ip <name>
- ❌
show-host-key <name>
- ❌
- ✅
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.