nixos-rebuild:tldr:68846
The command "sudo nixos-rebuild boot" is used in NixOS to build a new configuration and activate it on the next system boot.
Here's a breakdown of the command:
-
"sudo": This keyword is used to run the subsequent command with administrative privileges. It allows you to make system-wide changes that require elevated access.
-
"nixos-rebuild": This is the command-line tool provided by NixOS to manage system configuration. It is used to build and activate a new configuration.
-
"boot": This command is a specific subcommand of "nixos-rebuild." When "boot" is specified, it means that the new configuration will take effect on the next system boot.
Using "sudo nixos-rebuild boot" triggers NixOS to rebuild the configuration defined in the "/etc/nixos/configuration.nix" file, activating the changes after the next system restart. This command is commonly used after making changes to the NixOS configuration file to apply those changes and update the system accordingly.