···398398 [](#ch-options). A minimal example is shown in
399399 [Example: NixOS Configuration](#ex-config).
400400401401+ This command accepts an optional `--flake` option, to also generate a
402402+ `flake.nix` file, if you want to set up a flake-based configuration.
403403+401404 The command `nixos-generate-config` can generate an initial
402405 configuration file for you:
403406···489492 other issue (such as a network outage while downloading binaries
490493 from the NixOS binary cache), you can re-run `nixos-install` after
491494 fixing your `configuration.nix`.
495495+496496+ If you opted for a flake-based configuration, you will need to pass the
497497+ `--flake` here as well and specify the name of the configuration as used in
498498+ the `flake.nix` file. For the default generated flake, this is `nixos`.
499499+500500+ ```ShellSession
501501+ # nixos-install --flake 'path/to/flake.nix#nixos'
502502+ ```
492503493504 As the last step, `nixos-install` will ask you to set the password
494505 for the `root` user, e.g.
+2
nixos/doc/manual/release-notes/rl-2505.section.md
···30303131- `nixos-rebuild-ng`, a full rewrite of `nixos-rebuild` in Python, is available for testing. You can enable it by setting [system.rebuild.enableNg](options.html#opt-system.rebuild.enableNg) in your configuration (this will replace the old `nixos-rebuild`), or by adding `nixos-rebuild-ng` to your `environment.systemPackages` (in this case, it will live side-by-side with `nixos-rebuild` as `nixos-rebuild-ng`). It is expected that the next major version of NixOS (25.11) will enable `system.rebuild.enableNg` by default.
32323333+- The `nixos-generate-config` command now supports a optional `--flake` option, which will generate a flake.nix file alongside the `configuration.nix` and `hardware-configuration.nix`, providing an easy instroduction into flake-based system configurations.
3434+3335- A `nixos-rebuild build-image` sub-command has been added.
3436 It allows users to build platform-specific (disk) images from their NixOS configurations. `nixos-rebuild build-image` works similar to the popular [nix-community/nixos-generators](https://github.com/nix-community/nixos-generators) project. See new [section on image building in the nixpkgs manual](https://nixos.org/manual/nixpkgs/unstable/#sec-image-nixos-rebuild-build-image). It is also available for `nixos-rebuild-ng`.
3537