···5something](#ch-configuration) in that file, you should do
67```ShellSession
8-# nixos-rebuild switch
9```
1011-to build the new configuration, make it the default configuration for
12-booting, and try to realise the configuration in the running system
13-(e.g., by restarting system services).
01415::: {.warning}
16This command doesn't start/stop [user services](#opt-systemd.user.services)
···19:::
2021::: {.warning}
22-These commands must be executed as root, so you should either run them
23-from a root shell or by prefixing them with `sudo -i`.
00000000024:::
2526You can also do
2728```ShellSession
29-# nixos-rebuild test
30```
3132to build the configuration and switch the running system to it, but
···37There is also
3839```ShellSession
40-# nixos-rebuild boot
41```
4243to build the configuration and make it the boot default, but not switch
···47GRUB 2 boot screen by giving it a different *profile name*, e.g.
4849```ShellSession
50-# nixos-rebuild switch -p test
51```
5253which causes the new configuration (and previous ones created using
···58A repl, or read-eval-print loop, is also available. You can inspect your configuration and use the Nix language with
5960```ShellSession
61-# nixos-rebuild repl
62```
6364Your configuration is loaded into the `config` variable. Use tab for autocompletion, use the `:r` command to reload the configuration files. See `:?` or [`nix repl` in the Nix manual](https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-repl.html) to learn more.
···5something](#ch-configuration) in that file, you should do
67```ShellSession
8+$ nixos-rebuild switch --use-remote-sudo
9```
1011+to build the new configuration as your current user, and as the root user,
12+make it the default configuration for booting. `switch` will also try to
13+realise the configuration in the running system (e.g., by restarting system
14+services).
1516::: {.warning}
17This command doesn't start/stop [user services](#opt-systemd.user.services)
···20:::
2122::: {.warning}
23+Applying a configuration is an action that must be done by the root user, so the
24+`switch`, `boot` and `test` commands should be ran with the `--use-remote-sudo`
25+flag. Despite its odd name, this flag runs the activation script with elevated
26+permissions, regardless of whether or not the target system is remote, without
27+affecting the other stages of the `nixos-rebuild` call. This allows unprivileged
28+users to rebuild the system and only elevate their permissions when necessary.
29+30+Alternatively, one can run the whole command as root while preserving user
31+environment variables by prefixing the command with `sudo -E`. However, this
32+method may create root-owned files in `$HOME/.cache` if Nix decides to use the
33+cache during evaluation.
34:::
3536You can also do
3738```ShellSession
39+$ nixos-rebuild test --use-remote-sudo
40```
4142to build the configuration and switch the running system to it, but
···47There is also
4849```ShellSession
50+$ nixos-rebuild boot --use-remote-sudo
51```
5253to build the configuration and make it the boot default, but not switch
···57GRUB 2 boot screen by giving it a different *profile name*, e.g.
5859```ShellSession
60+$ nixos-rebuild switch -p test --use-remote-sudo
61```
6263which causes the new configuration (and previous ones created using
···68A repl, or read-eval-print loop, is also available. You can inspect your configuration and use the Nix language with
6970```ShellSession
71+$ nixos-rebuild repl
72```
7374Your configuration is loaded into the `config` variable. Use tab for autocompletion, use the `:r` command to reload the configuration files. See `:?` or [`nix repl` in the Nix manual](https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-repl.html) to learn more.
···483 pytest-pep8 = pytestpep8; # added 2021-01-04
484 pytest-pep257 = throw "pytest-pep257 was removed, as the pep257 package was migrated into pycodestyle"; # added 2022-04-12
485 pytest-pythonpath = throw "pytest-pythonpath is obsolete as of pytest 7.0.0 and has been removed"; # added 2022-03-09
0486 pytest-sanic = throw "pytest-sanic has been removed because it is unmaintained and broken"; # added 2023-06-22
487 pytestpep8 = throw "pytestpep8 was removed because it is abandoned and no longer compatible with pytest v6.0"; # added 2020-12-10
488 pytestquickcheck = pytest-quickcheck; # added 2021-07-20
···483 pytest-pep8 = pytestpep8; # added 2021-01-04
484 pytest-pep257 = throw "pytest-pep257 was removed, as the pep257 package was migrated into pycodestyle"; # added 2022-04-12
485 pytest-pythonpath = throw "pytest-pythonpath is obsolete as of pytest 7.0.0 and has been removed"; # added 2022-03-09
486+ pytest-runner = throw "pytest-runner has been removed as it uses deprecated features of setuptools and is deprecated by upstream"; # added 2024-09-15
487 pytest-sanic = throw "pytest-sanic has been removed because it is unmaintained and broken"; # added 2023-06-22
488 pytestpep8 = throw "pytestpep8 was removed because it is abandoned and no longer compatible with pytest v6.0"; # added 2020-12-10
489 pytestquickcheck = pytest-quickcheck; # added 2021-07-20