README: add TOC

This commit is contained in:
Daniel Langbein 2023-10-19 11:57:11 +02:00
parent 245c622b3b
commit 832f529b4c
Signed by: langfingaz
GPG Key ID: 6C47C753F0823002

View File

@ -1,6 +1,40 @@
# NixOS
For each host (server, laptop, etc.), there is a subdirectory inside [hosts](hosts).
- [NixOS](#nixos)
- [NixOS installation](#nixos-installation)
- [Update, build and switch](#update-build-and-switch)
- [Update](#update)
- [Build and switch: Using Colmena](#build-and-switch-using-colmena)
- [Build and switch: Manually](#build-and-switch-manually)
- [Option I: Build new config and activate it:](#option-i-build-new-config-and-activate-it)
- [Option II: Build new config and activate it during next boot:](#option-ii-build-new-config-and-activate-it-during-next-boot)
- [Option III: Build config and view changes:](#option-iii-build-config-and-view-changes)
- [niv: Dependency management](#niv-dependency-management)
- [Add Home Manager with niv](#add-home-manager-with-niv)
- [Add NUR with niv](#add-nur-with-niv)
- [disko and nixos-anywhere: Remote installation](#disko-and-nixos-anywhere-remote-installation)
- [Colmena: Deployment and secret management](#colmena-deployment-and-secret-management)
- [BTRFS swap file](#btrfs-swap-file)
- [LUKS Parameters](#luks-parameters)
- [Automount encrypted drive](#automount-encrypted-drive)
- [Failed services](#failed-services)
- [Garbage collection](#garbage-collection)
- [Run AppImages](#run-appimages)
- [General Notes](#general-notes)
- [Nix Pills](#nix-pills)
- [Papers](#papers)
- [System information](#system-information)
- [Search for packages](#search-for-packages)
- [Search for options](#search-for-options)
- [Search wich package owns a file](#search-wich-package-owns-a-file)
- [List files of package](#list-files-of-package)
- [Compare two versions of NixOS system profile](#compare-two-versions-of-nixos-system-profile)
- [NixOS configuration debugging](#nixos-configuration-debugging)
- [Show Nix configuration](#show-nix-configuration)
- [Evaluate NixOS configuration to JSON](#evaluate-nixos-configuration-to-json)
- [References](#references)
- [TODOs](#todos)
## NixOS installation
@ -127,7 +161,7 @@ Add nixpkgs unstable:
niv add NixOS/nixpkgs -n unstable -b nixpkgs-unstable
```
## Add Home Manager with niv
### Add Home Manager with niv
Home Manager:
@ -153,7 +187,7 @@ Use the corresponding branch:
niv add nix-community/home-manager -n home-manager -b release-23.05
```
## Add NUR with niv
### Add NUR with niv
> The Nix User Repository (NUR) is community-driven meta repository for Nix packages.
>
@ -244,7 +278,7 @@ sudo nixos-generate-config --dir hosts/$(hostname)
* If it is an SSD, enable `boot.initrd.luks.devices.<name>.allowDiscards`
### Failed services
## Failed services
If there are e.g. file conflicts due to preexisting dotfiles, the Home Manager user service might fail. To list all failed services, run: