Merge pull request #317623 from jmbaur/stc-ng-followup

This commit is contained in:
Sandro 2024-07-18 11:33:59 +02:00 committed by GitHub
commit fa5abfe559
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 15 additions and 4 deletions

View File

@ -6,10 +6,12 @@
{ {
# Disable switching to a new configuration. This is not a necessary # switch-to-configuration-ng reimplements switch-to-configuration, but
# limitation of a perlless system but just a current one. In the future, # without perl.
# perlless switching might be possible. system.switch = lib.mkDefault {
system.switch.enable = lib.mkDefault false; enable = false;
enableNg = true;
};
# Remove perl from activation # Remove perl from activation
boot.initrd.systemd.enable = lib.mkDefault true; boot.initrd.systemd.enable = lib.mkDefault true;
@ -21,6 +23,7 @@
programs.less.lessopen = lib.mkDefault null; programs.less.lessopen = lib.mkDefault null;
programs.command-not-found.enable = lib.mkDefault false; programs.command-not-found.enable = lib.mkDefault false;
boot.enableContainers = lib.mkDefault false; boot.enableContainers = lib.mkDefault false;
boot.loader.grub.enable = lib.mkDefault false;
environment.defaultPackages = lib.mkDefault [ ]; environment.defaultPackages = lib.mkDefault [ ];
documentation.info.enable = lib.mkDefault false; documentation.info.enable = lib.mkDefault false;

View File

@ -1,5 +1,10 @@
#! @perl@/bin/perl #! @perl@/bin/perl
# NOTE: This script has an alternative implementation at
# <nixpkgs/pkgs/by-name/sw/switch-to-configuration-ng>. Any behavioral
# modifications to this script should also be made to that implementation.
# Issue #166838 uncovered a situation in which a configuration not suitable # Issue #166838 uncovered a situation in which a configuration not suitable
# for the target architecture caused a cryptic error message instead of # for the target architecture caused a cryptic error message instead of
# a clean failure. Due to this mismatch, the perl interpreter in the shebang # a clean failure. Due to this mismatch, the perl interpreter in the shebang

View File

@ -0,0 +1,3 @@
# switch-to-configuration-ng
This program is a reimplementation of [switch-to-configuration](nixos/modules/system/activation/switch-to-configuration.pl) in Rust. The goal is to be compatible in as many ways as possible to the original implementation, at least as long as the original is still in nixpkgs. Any behavioral modifications to this program should also be implemented in the original, and vice versa.