Commit 83dfcbb3 authored by K900's avatar K900
Browse files

Merge remote-tracking branch 'origin/master' into staging-next

parents f02a4ace 57df5382
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -132,6 +132,8 @@

- [Sshwifty](https://github.com/nirui/sshwifty), a Telnet and SSH client for your browser. Available as [services.sshwifty](#opt-services.sshwifty.enable).

- Added `nixos-init`, a Rust-based bashless initialization system for systemd initrd. This allows to build NixOS systems without any interpreter. Enable via `system.nixos-init.enable = true;`.

## Backward Incompatibilities {#sec-release-25.11-incompatibilities}

<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
+1 −0
Original line number Diff line number Diff line
@@ -1803,6 +1803,7 @@
  ./system/activation/activatable-system.nix
  ./system/activation/activation-script.nix
  ./system/activation/bootspec.nix
  ./system/activation/nixos-init.nix
  ./system/activation/pre-switch-check.nix
  ./system/activation/specialisation.nix
  ./system/activation/switchable-system.nix
+1 −1
Original line number Diff line number Diff line
@@ -594,7 +594,7 @@ in
      ]
      ++ lib.optionals (cfg.settings.capi.credentialsFile != null) [
        ''
          if ! grep -q password "${cfg.settings.capi.credentialsFile}" ]; then
          if ! ${lib.getExe pkgs.gnugrep} -q password "${cfg.settings.capi.credentialsFile}" ]; then
            ${lib.getExe cscli} capi register
          fi
        ''
+31 −0
Original line number Diff line number Diff line
{
  config,
  lib,
  pkgs,
  ...
}:

let
  cfg = config.system.nixos-init;
in
{
  options.system.nixos-init = {
    enable = lib.mkEnableOption ''
      nixos-init, a system for bashless initialization.

      This doesn't use any `activationScripts`. Anything set in these options is
      a no-op here.
    '';

    package = lib.mkPackageOption pkgs "nixos-init" { };
  };

  config = lib.mkIf cfg.enable {
    assertions = [
      {
        assertion = config.boot.initrd.systemd.enable;
        message = "nixos-init can only be used with systemd initrd";
      }
    ];
  };
}
+5 −2
Original line number Diff line number Diff line
@@ -14,12 +14,15 @@ let
    ${
      if config.boot.initrd.enable && config.boot.initrd.systemd.enable then
        ''
          cp ${config.system.build.bootStage2} $out/prepare-root
          substituteInPlace $out/prepare-root --subst-var-by systemConfig $out
          # This must not be a symlink or the abs_path of the grub builder for the tests
          # will resolve the symlink and we end up with a path that doesn't point to a
          # system closure.
          cp "$systemd/lib/systemd/systemd" $out/init

          ${lib.optionalString (!config.system.nixos-init.enable) ''
            cp ${config.system.build.bootStage2} $out/prepare-root
            substituteInPlace $out/prepare-root --subst-var-by systemConfig $out
          ''}
        ''
      else
        ''
Loading