nixpkgs/nixos/modules
Emily 56dea6da87 nixos: switch to switch-to-configuration-ng by default
The Rust `switch-to-configuration-ng` rewrite was carefully written
to be compatible with the original Perl script, has been checked
against NixOS VM tests, and has been available on an opt‐in basis
for testing for the 24.05 release cycle.

The next step towards replacing the Perl script entirely is to
switch it on by default so that we can get real‐world testing from
a much greater number of users. Maintaining two implementations in
parallel is becoming a burden; we are having to adjust the systemd
service activation behaviour slightly to fix a long‐standing bug,
and backporting the changes to the Perl script is an unpleasant
process. We will do it anyway to ensure that the Rust and Perl
implementations keep parity with each other throughout the 24.11
release cycle, but we think the time has come to flip the switch.

Taking this step now will give us two to three months to test this in
the wild before the 24.11 release and gain confidence that there are
no regressions. If any non‐trivial problems arise before the final
release, we will revert to the Perl implementation by default. Doing
this switch ASAP will help to disentangle any problems that might
arise from the Rust implementation from problems that arise from the
systemd service activation changes, or the upcoming switch to using
systemd in stage 1 by default.

The main concern that was raised about replacing the Perl script in the
PR that added `switch-to-configuration-ng` was that it is currently
possible to run NixOS on systems that cannot natively host a Rust
compiler. This does not apply to any platforms that have official
support from NixOS, and as far as I know we do not know of any such
systems with users that are not cross‐compiling anyway.

My understanding is that these systems are already broken by default
anyway, as `systemd.shutdownRamfs.enable` is on by default and uses
`make-initrd-ng`, which is also written in Rust. Switching the default
while keeping the Perl implementation around will give us at least
an entire release cycle to find out if there are any users that will
be affected by this and decide what to do about it if so.

There is currently one known inconsistency between
the Perl and Rust implementations, as documented in
<https://github.com/NixOS/nixpkgs/issues/312297>; the Rust
implementation has more accurate handling of failed systemd units.

We slightly adjust the semantics of `system.switch.enable{,Ng}` to
not conflict with each other, so that `system.switch.enableNg` is
on by default, but turning off `system.switch.enable` still results
in no `switch-to-configuration` implementation being used. This
won’t break the configuration of anyone who already opted in to
`system.switch.enableNg` and is probably how the option should have
worked to begin with.
2024-09-06 08:35:43 +01:00
..
config treewide: fix eval related to with lib; removal 2024-09-04 12:21:09 -04:00
hardware treewide/nixos: remove with lib; part 2 (#335618) 2024-08-30 15:56:57 -07:00
i18n/input-method nixos/fcitx5: fix evaluation 2024-08-31 09:20:31 -04:00
image nixos/repart-image: fix amend script 2024-07-10 11:40:40 +02:00
installer nixos/installer: don't enable Pulseaudio 2024-09-04 13:56:50 +03:00
misc Revert "nixos/version: validate system.stateVersion" (#339671) 2024-09-05 03:22:20 +02:00
profiles nixos/installer: drop support for ReiserFS and JFS 2024-09-05 16:00:35 +01:00
programs nixos/*: use pipewire by default (#339209) 2024-09-04 22:42:18 +01:00
security nixos/security.acme: remove with lib; (#339101) 2024-09-06 00:08:41 +02:00
services nixos/stalwart-mail: package and configure webadmin (#314820) 2024-09-06 01:03:27 +00:00
system nixos: switch to switch-to-configuration-ng by default 2024-09-06 08:35:43 +01:00
tasks treewide/nixos: remove with lib; part 2 (#335618) 2024-08-30 15:56:57 -07:00
testing treewide: fix mkEnableOption usage 2024-06-14 02:41:42 -04:00
virtualisation brightboxImage: remove, as it seems unmaintained 2024-09-05 14:40:29 +02:00
module-list.nix Revert "nixos: support dm-verity" 2024-09-05 15:56:49 -04:00
rename.nix antennas: drop 2024-08-22 15:51:27 +01:00