update README

This commit is contained in:
Daniel Langbein 2023-10-09 11:36:03 +02:00
parent 3dbfd3e49f
commit 9dbbc756c1
Signed by: langfingaz
GPG Key ID: 6C47C753F0823002

View File

@ -72,13 +72,13 @@ nix --extra-experimental-features nix-command store diff-closures /run/current-s
Depending on if there are large kernel changes, either switch to it directly or wait until next boot:
```shell
# TODO: This is not persistent (after reboot).
sudo ./result/bin/switch-to-configuration switch
# or
# TODO: This does not work. There is no new boot menu entry :/
sudo ./result/bin/switch-to-configuration boot
```
Note: The Perl script executed by both above commands _should_ create a new bootloader menu entry and mark it as default. However, if I remember correctly, the menu entry was once missing and the configuration change thus not permanent. This might need further testing. See also: https://nixos.wiki/wiki/Nixos-rebuild#Internals
## niv: Dependency management
* https://nix.dev/tutorials/first-steps/towards-reproducibility-pinning-nixpkgs#dependency-management-with-niv
@ -435,12 +435,18 @@ config.home-manager.users.yoda.programs.zsh.history.path
#=> "/home/yoda/.local/share/.histfile"
```
### Show Nix configuration
* https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-show-config.html
```shell
nix --extra-experimental-features nix-command show-config
```
### Evaluate NixOS configuration to JSON
See also section "NixOS Configuration Debugging"!
TODO: https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-show-config.html
* https://discourse.nixos.org/t/can-i-run-nix-instantiate-eval-strict-on-my-configuration-nix/7105/4
This evaluates `configuration.nix` (single module):
@ -455,7 +461,7 @@ import ./hosts/yodaTab/configuration.nix {
' > evaluated-config.json
```
Then open [evaluated-config.json](evaluated-config.json).
Then open `evaluated-config.json`.
### References