about summary refs log tree commit diff
path: root/nixos/doc
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2023-07-09 23:04:27 +0200
committerRobert Hensing <robert@roberthensing.nl>2023-12-10 06:36:02 +0100
commit0e062cb692c3f28c4d5c5a60e30aedc8816e2924 (patch)
treea89caa6ce98cd23e0b3f82243b1804114648ac34 /nixos/doc
parent584463c7449a116f095eb456116f728c2b31497b (diff)
downloadnixlib-0e062cb692c3f28c4d5c5a60e30aedc8816e2924.tar
nixlib-0e062cb692c3f28c4d5c5a60e30aedc8816e2924.tar.gz
nixlib-0e062cb692c3f28c4d5c5a60e30aedc8816e2924.tar.bz2
nixlib-0e062cb692c3f28c4d5c5a60e30aedc8816e2924.tar.lz
nixlib-0e062cb692c3f28c4d5c5a60e30aedc8816e2924.tar.xz
nixlib-0e062cb692c3f28c4d5c5a60e30aedc8816e2924.tar.zst
nixlib-0e062cb692c3f28c4d5c5a60e30aedc8816e2924.zip
nixos-rebuild: Add nixos-rebuild repl
Apologies to the non-flake users; your repl isn't quite as fancy,
but at least evaluates your config exactly as you would expect,
unlike flakes which are only evaluated impurely for now.
Diffstat (limited to 'nixos/doc')
-rw-r--r--nixos/doc/manual/installation/changing-config.chapter.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/nixos/doc/manual/installation/changing-config.chapter.md b/nixos/doc/manual/installation/changing-config.chapter.md
index 12abf90b718f..9e56b15a880f 100644
--- a/nixos/doc/manual/installation/changing-config.chapter.md
+++ b/nixos/doc/manual/installation/changing-config.chapter.md
@@ -55,6 +55,14 @@ which causes the new configuration (and previous ones created using
 This can be useful to separate test configurations from "stable"
 configurations.
 
+A repl, or read-eval-print loop, is also available. You can inspect your configuration and use the Nix language with
+
+```ShellSession
+# nixos-rebuild repl
+```
+
+Your 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.
+
 Finally, you can do
 
 ```ShellSession