From 2cf4e112a83c626dcd9a56a599365e00604c71fc Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Tue, 29 Oct 2024 20:47:26 +0100 Subject: [PATCH] nixos/doc/rl: Add NixOS apply script --- nixos/doc/manual/release-notes/rl-2411.section.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nixos/doc/manual/release-notes/rl-2411.section.md b/nixos/doc/manual/release-notes/rl-2411.section.md index a0600247bcd1..8123f2ca52e9 100644 --- a/nixos/doc/manual/release-notes/rl-2411.section.md +++ b/nixos/doc/manual/release-notes/rl-2411.section.md @@ -50,6 +50,16 @@ If you experience any issues, please report them. The original Perl script is deprecated and is planned for removal in the 25.05 release. It will remain accessible until then by setting `system.switch.enableNg` to `false`. +- Built NixOS configurations now have a `$toplevel/bin/apply` script. + Unlike `switch-to-configuration`, it is capable of performing a complete `switch` operation. + If you call `switch-to-configuration` directly, you are recommended to use `apply` instead, and remove your call to `nix-env --profile /nix/var/nix/profiles/system --set $toplevel` or similar. + It will run the switch operation as a systemd unit if available, as `nixos-rebuild switch` would. + + Benefits include: + - The `apply` script reduces the roundtrips required when performing a remote deployment with `nixos-rebuild switch --target-host HOST`. + - Developers and power users can now update NixOS in a single call. + - Alternative NixOS deployment methods have feature parity with `nixos-rebuild`, and NixOS can evolve all of its switching logic in one place. + - Support for mounting filesystems from block devices protected with [dm-verity](https://docs.kernel.org/admin-guide/device-mapper/verity.html) was added through the `boot.initrd.systemd.dmVerity` option.