Skip to content

Releases: nix-community/nixos-cli

0.15.0

09 Nov 12:19

Choose a tag to compare

What's Changed

Remote Building/Activation

The long-anticipated --build-host and --target-host parameters from nixos-rebuild.sh are now available! nixos-cli can now deploy systems remotely with SSH, and with virtually no interaction required if correctly configured.

  • feat(apply): add support for remote building/activation by @water-sucks in #116
  • feat(system): mimic SSH known_hosts key addition process by @water-sucks in #121
  • feat(system): redo password handling for remote root, allow SSH password auth by @water-sucks in #124

Image Building

nixos apply now supports building pre-configured disk images for various platforms using the --image <variant> flag.

Examples of possible variants include iso, proxmox, ec2, and many others, Run nixos apply --image '' to list available images for your configuration.

Miscellaneous Features

  • feat: specify parameters for file and attribute for legacy-style CLIs by @water-sucks in #129

Bug Fixes

  • fix(logger): remove spurious debug prefix from cmd arrays in console by @water-sucks in #115
  • fix(completion): disable settings warning in completion mode by @water-sucks in #118
  • fix(system): redo signal forwarding for processes by @water-sucks in #125
  • fix(install): resolve longstanding bugs with installation process by @water-sucks in #128
  • fix(nix): rename pkgs.system -> pkgs.stdenv.hostPlatform.system by @water-sucks in #130

Full Changelog: 0.14.0...0.15.0

0.14.0

22 Oct 03:50
0.14.0
8f3c7c5

Choose a tag to compare

What's Changed

Activation Interface

A new activation interface is available! This is a reimplementation of switch-to-configuration-ng in Go as a self-contained binary.

The reasoning for creating this is in the linked issue at #55.

  • feat(apply): pass NIXOS_GENERATION_TAG through if it is set by @water-sucks in #97

Miscellaneous Features

  • feat(settings): suppress the no settings warning based on env var by @water-sucks in #93
  • feat(init): always use release number from nixpkgs by @water-sucks in #98
  • feat(completion): support completions in other shells using carapace by @nuttycream in #99
  • feat(generation): add regex match flag for deleting generations by @water-sucks in #103
  • feat: create self-contained activation command by @water-sucks in #94
  • refactor(log): generalize interface and add new log types by @water-sucks in #111

Bug Fixes

  • fix: resolve golangci-lint warnings, add to CI checks by @water-sucks in #101
  • fix(apply): correct condition for setting --impure with commit messages by @water-sucks in #102
  • fix(apply): do not create generations when --no-boot is specified by @water-sucks in #106
  • fix: Resolve symlink before FlakeRefFromEnv by @Darkness9724 in #107
  • fix(install): use cobra.Command to set include flag for nixos-config value by @water-sucks in #109

New Contributors

Full Changelog: 0.13.0...0.14.0

0.13.0

13 Jul 22:56
0.13.0
f885d72

Choose a tag to compare

What's Changed

Breaking Changes

  • feat(option)!: update optnix, use interactive mode by default by @water-sucks in #92

The optnix dependency has been updated to v0.2.0. This brings some new behavior that is now mirrored in nixos-cli: namely, interactive mode (previously hidden with nixos option -i) is now the default.

To opt out of interactive mode and get the original behavior of nixos option back, use nixos option -n. Using JSON or value-only output implicitly uses this mode as well.

Bug Fixes

  • fix(generation): do not fail if nixos-version.json is not found by @water-sucks in #85
  • fix(nixopts): remove redundant -- from -I flag construction by @water-sucks in #86
  • fix(configuration): use dirname for configuration if path is to a direct file by @water-sucks in #87
  • fix(apply): use correct error message for dirty git trees by @water-sucks in #89
  • fix(build): add guards for platform-specific support by @water-sucks in #90
  • fix(init): call nixpkgs version function from build opts by @water-sucks in #91

Other

  • refactor(build): use immutable functions for retrieving compile-time variables by @water-sucks in #84

Shoutouts

Huge shoutout to @Wishmater for finding many of these bugs in the legacy nixos-cli implementation.

Full Changelog: 0.12.3...0.13.0

0.12.3

29 Jun 23:10
0.12.3
1782b39

Choose a tag to compare

What's Changed

This release was created because the module import for v0.12.2 was not working for legacy systems due to an unforseen bug with how it was declared.

Mostly contains very small fixes and updates to dependencies and documentation.

  • fix(docs): categorize flags per command, pass commit hash to site gen by @water-sucks in #61
  • chore: update cobra -> 1.9.1, use its inbuilt CompletionFunc type by @water-sucks in #66
  • feat: use optnix implementation for option command by @water-sucks in #67
  • chore: remove flake-parts dependency by @water-sucks in #68
  • missing semicolon in installation.md by @asdanjer in #70
  • fix(module): use normal import call for exposing module in default.nix by @water-sucks in #78
  • feat(module): use legacy package by default when imported through default.nix by @water-sucks in #79
  • docs: add comparisons page, update references to projects by @water-sucks in #80

New Contributors

Full Changelog: 0.12.2...0.12.3

0.12.2

11 May 01:47
0.12.2
3747c9d

Choose a tag to compare

This release is mostly a bugfix release.

What's Changed

  • fix(option): add flake ref argument to option command by @water-sucks in #57
  • feat(settings): add auto-rollback setting by @water-sucks in #59
  • fix(apply): run switch-to-configuration test when only --no-boot is specified
  • fix(apply): require --output option for build-only runs

Full Changelog: 0.12.1...0.12.2

0.12.1

05 May 00:05
0.12.1
20f5bb1

Choose a tag to compare

What's Changed

Man Pages+Website

A new high-level documentation website created using mdbook is live, at https://water-sucks.github.io/nixos, for an easier introduction to why this tool even exists.

Also, much more exhaustive man pages are now distributed in the Nix package, generated using scdoc.

Misc. Changes

  • some nix cleanup :D by @isabelroses in #51
  • feat(option): remove help view, use man page for TUI help
  • fix(option): use stderr for spinner output (fixes JSON output for nixos option -j)
  • fix(build): use proper "revision" attribute instead of "rev" for legacy package builds
  • fix some completion discrepancies for bools

New Contributors

Thanks

Thanks, @isabelroses! For spreading the word about my project in your Discord :}

Full Changelog: 0.12.0...0.12.1

0.12.0

28 Apr 05:55
0.12.0
8f14646

Choose a tag to compare

What's Changed

Rewrite

A full rewrite has been completed, from Zig to Go. I will be outlining the reasons for this architectural change at a later time, and will edit this post with the link. For now, a short explanation of my changes is in the linked PR.

Rewrite PR: #50

Along with this rewrite, a slew of small (also potentially breaking!) changes:

  • Remove aliases for --config and --color-always command-line flags
  • Remove aliases subcommand
  • option.max_rank changed to option.min_score, has the opposite behavior now, as well as a command-line switch
  • Add option.debounce_time setting, to optimize responsiveness for the option UI

New Features

  • New root_command setting: change what command to use to escalate to root (by default sudo)
  • A new look for the generation list command
    2025-04-27_22-51-41
  • nixos generation list now uses the UI by default, a -t switch is provided for tabular format
  • A slightly changed look for the nixos option UI as well, for the evaluated values

v0.11.1

16 Nov 06:39
0.11.1
85dbcb7

Choose a tag to compare

What's Changed

Fix Dependency Breakage

The upstream libvaxis and zf dependencies were broken by some renaming of transitive dependencies' repos. Be careful out there, people! I had to dig through GitHub issues to find out why this was breaking, and that sucked.

I thought this breakage was deserving of a patch release number. Keep in mind that since this is a short fixed release, the actual update commit was a bit weird, and involved some workarounds for integers, so this may just completely bug out if you have more than 2^16 (65,536) generations on your machine, which I doubt most people do, to be frank.

v0.11.0

18 Aug 10:59
0.11.0
33e4f76

Choose a tag to compare

What's Changed

Options Search TUI

nixos-option-cli.mp4

OK, this is pretty killer. You can now search through your NixOS options locally! Run nixos option -i to see what options are available for use in your configuration, and press to see their value.

Make sure to enable the options cache using the services.nixos-cli.prebuildOptionCache for much faster startup time.

Search results can be fine-tuned for how strict you want your matching to be. See the options.max_rank configuration option for more information.

Set Config Options On Command Line

Configuration properties can now be set with a command-line flag in the form of --config key=value.

This is to make setting configuration values easier without having to copy a configuration file or rebuild a configuration.

Other Features

  • feat(generation): collect garbage automatically upon deletion

Full Changelog: 0.10.0...0.11.0

v0.10.0

13 Aug 03:56
0.10.0
7ca490c

Choose a tag to compare

What's Changed

Generation Manager TUI

View information about and manage your generations graphically, directly within the terminal.

2024-08-12_19-35-16

This TUI makes it easier to look at your list of generations and view information about them. You can also:

  • Delete many generations using nixos generation delete
  • Switch to any generation within the list
  • Filter generations by description

With more to come in the future, if people request it.

Targeted Generation Deletion :: nixos generation delete

nixos generation delete does targeted removal of generation GC roots in the system profile. This allows for those generations to be collected by garbage collection only, provided the user is also not using nix-collect-garbage -d.

Garbage from these generations will remain until nix store gc is ran.

System Diffs + Interactive Activation Confirmation

Upon activation, (with either the apply, generation rollback, or generation switch commands), a diff between the current system and the system to be activated is shown. The user will need to confirm activation after looking at the differences. This can use either the builtin nix store diff-closures tool or nvd, if enabled in the config. Interactive activation can be disabled through the config or with a switch, if one desires.

Show Third-Party Module Options

https://search.nixos.org/options does not show you options in your current configuration. This builds an option cache on the fly for a given configuration using the entire collection of NixOS options, so now you can search through modules that you add to your configuration, such as sops-nix, agenix, home-manager and many more.

I plan on extending this functionality to include special integrations with separate module systems such as home-manager options, since these live in a separate evaluation from the NixOS modules, and thus are not discoverable by the current method of option cache generation. This will supercharge the nixos option command even more.

Bug Fixes

Full Changelog: 0.9.0...0.10.0