Unverified Commit a5b6d17b authored by Robert Hensing's avatar Robert Hensing Committed by GitHub
Browse files

nixos: Shuffle definitions and deprecate system.extraSystemBuilderCmds (#460976)

parents ccea08b7 41b98b4a
Loading
Loading
Loading
Loading
+2 −12
Original line number Diff line number Diff line
@@ -53,8 +53,6 @@ let
      ${config.boot.bootspec.writer}
      ${optionalString config.boot.bootspec.enableValidation ''${config.boot.bootspec.validator} "$out/${config.boot.bootspec.filename}"''}
    ''}

    ${config.system.extraSystemBuilderCmds}
  '';

  # Putting it all together.  This builds a store path containing
@@ -129,6 +127,7 @@ in
      [ "system" "replaceRuntimeDependencies" ]
      [ "system" "replaceDependencies" "replacements" ]
    )
    (mkRenamedOptionModule [ "system" "extraSystemBuilderCmds" ] [ "system" "systemBuilderCommands" ])
  ];

  options = {
@@ -213,15 +212,6 @@ in
      '';
    };

    system.extraSystemBuilderCmds = mkOption {
      type = types.lines;
      internal = true;
      default = "";
      description = ''
        This code will be added to the builder creating the system store path.
      '';
    };

    system.extraDependencies = mkOption {
      type = types.listOf types.pathInStore;
      default = [ ];
@@ -343,7 +333,7 @@ in
      }
    ];

    system.extraSystemBuilderCmds =
    system.systemBuilderCommands =
      optionalString config.system.copySystemConfiguration ''
        ln -s '${import ../../../lib/from-env.nix "NIXOS_CONFIG" <nixos-config>}' \
          "$out/configuration.nix"
+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ in
        boot.loader.grub.enable = false;

        specialisation = rec {
          brokenInitInterface.configuration.config.system.extraSystemBuilderCmds = ''
          brokenInitInterface.configuration.config.system.systemBuilderCommands = ''
            echo "systemd 0" > $out/init-interface-version
          '';