Unverified Commit fadc273d authored by rnhmjoj's avatar rnhmjoj
Browse files

nixos/release-notes: explain the new system.nix file

parent 5c562a35
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
@@ -4,6 +4,32 @@

<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->

- The system.nix file has been added has an alternative entry point to configuration.nix (and flake.nix) that allows to configure NixOS without using `nix-channel`.
  This file must evaluate to a NixOS system derivation or an attribute set of such derivations, in which case the attribute to build has to be selected with the `--attr` option of `nixos-rebuild` or `nixos-install`.
  For example,
  ```nix
  # system.nix
  let
    # Pinned Nixpkgs archive
    #
    # Use `curl -I https://channels.nixos.org/nixos-26.05` to get the
    # latest commit of the stable channel and `nix-prefetch-url --unpack`
    # to compute its sha256 hash.
    nixpkgs = builtins.fetchTarball {
      url = "https://github.com/NixOS/nixpkgs/archive/c217913993d6.tar.gz";
      sha256 = "026mprs324330pfazlgbw987qmsa8ligglarvqbcxzig2kgw0lqg";
    };
  in
  import "${nixpkgs}/nixos" {
    # Build NixOS using an external configuration.nix file,
    # or directly set your options here
    configuration = ./configuration.nix;
  }
  ```

  The default location of system.nix is `/etc/nixos/system.nix` and can be changed by setting the `<nixos-system>` search path.
  `nixos-rebuild` and `nixos-install` can now also load a system.nix file in the current directory (only if `--attr` is used) or from a directory specified with `--file`.

- The default kernel package has been updated from 6.12 to 6.18. All supported kernels remain available.

## New Modules {#sec-release-26.05-new-modules}