Home Explore Blog CI



nixpkgs

7th chunk of `nixos/doc/manual/installation/installing.chapter.md`
20c7f6fc1afd1afae1ab3c3f32176f91aa9ec6644048a19a0000000100000957
    ```

    This will install your system based on the configuration you
    provided. If anything fails due to a configuration problem or any
    other issue (such as a network outage while downloading binaries
    from the NixOS binary cache), you can re-run `nixos-install` after
    fixing your `configuration.nix`.

    If you opted for a flake-based configuration, you will need to pass the
    `--flake` here as well and specify the name of the configuration as used in
    the `flake.nix` file. For the default generated flake, this is `nixos`.

    ```ShellSession
    # nixos-install --flake 'path/to/flake.nix#nixos'
    ```

    As the last step, `nixos-install` will ask you to set the password
    for the `root` user, e.g.

    ```plain
    setting root password...
    New password: ***
    Retype new password: ***
    ```

    If you have a user account declared in your `configuration.nix` and plan to log in using this user, set a password before rebooting, e.g. for the `alice` user:

    ```ShellSession
    # nixos-enter --root /mnt -c 'passwd alice'
    ```

    ::: {.note}
    For unattended installations, it is possible to use
    `nixos-install --no-root-passwd` in order to disable the password
    prompt entirely.
    :::

6.  If everything went well:

    ```ShellSession
    # reboot
    ```

7.  You should now be able to boot into the installed NixOS. The GRUB
    boot menu shows a list of *available configurations* (initially just
    one). Every time you change the NixOS configuration (see [Changing
    Configuration](#sec-changing-config)), a new item is added to the
    menu. This allows you to easily roll back to a previous
    configuration if something goes wrong.

    Use your declared user account to log in.
    If you didn’t declare one, you should still be able to log in using the `root` user.

    ::: {.note}
    Some graphical display managers such as SDDM do not allow `root` login by default, so you might need to switch to TTY.
    Refer to [](#sec-user-management) for details on declaring user accounts.
    :::

    You may also want to install some software. This will be covered in
    [](#sec-package-management).

### Installation summary {#sec-installation-manual-summary}
[]{#sec-installation-summary} <!-- legacy anchor -->

To summarise, [Example: Commands for Installing NixOS on `/dev/sda`](#ex-install-sequence)

Title: Finalizing NixOS Installation: Rebooting, User Login, and Post-Install Steps
Summary
This section outlines the final steps of the NixOS installation process, including setting the root password or using unattended installation options, rebooting the system, and logging in with a declared user account or the root user. It also mentions the availability of previous configurations in the GRUB boot menu for easy rollbacks. Finally, it directs the user to sections on user management and package management for further configuration and software installation.