Unverified Commit fa5abfe5 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

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

parents f7617f47 6f1f3c81
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -6,10 +6,12 @@

{

  # Disable switching to a new configuration. This is not a necessary
  # limitation of a perlless system but just a current one. In the future,
  # perlless switching might be possible.
  system.switch.enable = lib.mkDefault false;
  # switch-to-configuration-ng reimplements switch-to-configuration, but
  # without perl.
  system.switch = lib.mkDefault {
    enable = false;
    enableNg = true;
  };

  # Remove perl from activation
  boot.initrd.systemd.enable = lib.mkDefault true;
@@ -21,6 +23,7 @@
  programs.less.lessopen = lib.mkDefault null;
  programs.command-not-found.enable = lib.mkDefault false;
  boot.enableContainers = lib.mkDefault false;
  boot.loader.grub.enable = lib.mkDefault false;
  environment.defaultPackages = lib.mkDefault [ ];
  documentation.info.enable = lib.mkDefault false;

+5 −0
Original line number Diff line number Diff line
#! @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
# for the target architecture caused a cryptic error message instead of
# a clean failure. Due to this mismatch, the perl interpreter in the shebang
+3 −0
Original line number Diff line number Diff line
# 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.