···20- `hardware.display` is a new module implementing workarounds for misbehaving monitors
21 through setting up custom EDID files and forcing kernel/framebuffer modes.
2223-- NixOS now has support for *automatic boot assessment* (see [here](https://systemd.io/AUTOMATIC_BOOT_ASSESSMENT/)) for detailed description of the feature) for `systemd-boot` users. Available as [boot.loader.systemd-boot.bootCounting](#opt-boot.loader.systemd-boot.bootCounting.enable).
24-25- A new display-manager `services.displayManager.ly` was added.
26 It is a tui based replacement of sddm and lightdm for window manager users.
27 Users can use it by `services.displayManager.ly.enable` and config it by
···20- `hardware.display` is a new module implementing workarounds for misbehaving monitors
21 through setting up custom EDID files and forcing kernel/framebuffer modes.
220023- A new display-manager `services.displayManager.ly` was added.
24 It is a tui based replacement of sddm and lightdm for window manager users.
25 Users can use it by `services.displayManager.ly.enable` and config it by
···1-# Automatic boot assessment with systemd-boot {#sec-automatic-boot-assessment}
2-3-## Overview {#sec-automatic-boot-assessment-overview}
4-5-Automatic boot assessment (or boot-counting) is a feature of `systemd-boot` that allows for automatically detecting invalid boot entries.
6-When the feature is active, each boot entry has an associated counter with a user defined number of trials. Whenever `systemd-boot` boots an entry, its counter is decreased by one, ultimately being marked as *bad* if the counter ever reaches zero. However, if an entry is successfully booted, systemd will permanently mark it as *good* and remove the counter altogether. Whenever an entry is marked as *bad*, it is sorted last in the `systemd-boot` menu.
7-A complete explanation of how that feature works can be found [here](https://systemd.io/AUTOMATIC_BOOT_ASSESSMENT/).
8-9-## Enabling the feature {#sec-automatic-boot-assessment-enable}
10-11-The feature can be enabled by toogling the [boot.loader.systemd-boot.bootCounting](#opt-boot.loader.systemd-boot.bootCounting.enable) option.
12-13-## The boot-complete.target unit {#sec-automatic-boot-assessment-boot-complete-target}
14-15-A *successful boot* for an entry is defined in terms of the `boot-complete.target` synchronisation point. It is up to the user to schedule all necessary units for the machine to be considered successfully booted before that synchronisation point.
16-For example, if you are running `docker` on a machine and you want to be sure that a *good* entry is an entry where docker is started successfully.
17-A configuration for that NixOS machine could look like that:
18-19-```
20-boot.loader.systemd-boot.bootCounting.enable = true;
21-services.docker.enable = true;
22-23-systemd.services.docker = {
24- before = [ "boot-complete.target" ];
25- wantedBy = [ "boot-complete.target" ];
26- unitConfig.FailureAction = "reboot";
27-};
28-```
29-30-The systemd service type must be of type `notify` or `oneshot` for systemd to dectect the startup error properly.
31-32-## Interaction with specialisations {#sec-automatic-boot-assessment-specialisations}
33-34-When the boot-counting feature is enabled, `systemd-boot` will still try the boot entries in the same order as they are displayed in the boot menu. This means that the specialisations of a given generation will be tried directly after that generation, but that behavior is customizable with the [boot.loader.systemd-boot.sortKey](#opt-boot.loader.systemd-boot.sortKey) option.
35-36-## Limitations {#sec-automatic-boot-assessment-limitations}
37-38-This feature has to be used wisely to not risk any data integrity issues. Rollbacking into past generations can sometimes be dangerous, for example if some of the services may have undefined behaviors in the presence of unrecognized data migrations from future versions of themselves.
···26}:
2728let
29- version = "1.17.2";
3031 # build stimuli file for PGO build and the script to generate it
32 # independently of the foot's build, so we can cache the result
···98 owner = "dnkl";
99 repo = "foot";
100 rev = version;
101- hash = "sha256-p+qaWHBrUn6YpNyAmQf6XoQyO3degHP5oMN53/9gIr4=";
102 };
103104 separateDebugInfo = true;
···156 "-Dcustom-terminfo-install-location=${terminfoDir}"
157 # Install systemd user units for foot-server
158 "-Dsystemd-units-dir=${placeholder "out"}/lib/systemd/user"
00159 ];
160161 # build and run binary generating PGO profiles,
···26}:
2728let
29+ version = "1.18.1";
3031 # build stimuli file for PGO build and the script to generate it
32 # independently of the foot's build, so we can cache the result
···98 owner = "dnkl";
99 repo = "foot";
100 rev = version;
101+ hash = "sha256:15s7fbkibvq53flf5yy9ad37y53pl83rcnjwlnfh96a4s5mj6v5d";
102 };
103104 separateDebugInfo = true;
···156 "-Dcustom-terminfo-install-location=${terminfoDir}"
157 # Install systemd user units for foot-server
158 "-Dsystemd-units-dir=${placeholder "out"}/lib/systemd/user"
159+ # Especially -Wunused-command-line-argument is a problem with clang
160+ "-Dwerror=false"
161 ];
162163 # build and run binary generating PGO profiles,
···89buildGoModule rec {
10 pname = "honk";
11- version = "1.3.1";
1213 src = fetchurl {
14 url = "https://humungus.tedunangst.com/r/honk/d/honk-${version}.tgz";
15- hash = "sha256-F4Hz36nvcZv8MTh7a9Zr73kEBTS0c16Xty3T6/EzJeI=";
16 };
17 vendorHash = null;
18···27 subPackages = [ "." ];
2829 # This susbtitution is not mandatory. It is only existing to have something
30- # working out of the box. This value can be overriden by the user, by
31 # providing the `-viewdir` parameter in the command line.
32 postPatch = ''
33- substituteInPlace main.go --replace \
34 "var viewDir = \".\"" \
35 "var viewDir = \"$out/share/honk\""
36 '';
···89buildGoModule rec {
10 pname = "honk";
11+ version = "1.4.1";
1213 src = fetchurl {
14 url = "https://humungus.tedunangst.com/r/honk/d/honk-${version}.tgz";
15+ hash = "sha256-o9K/ht31nEbx2JmLG3OSIgKZGygpDhZYqCxs6tuSnlc=";
16 };
17 vendorHash = null;
18···27 subPackages = [ "." ];
2829 # This susbtitution is not mandatory. It is only existing to have something
30+ # working out of the box. This value can be overridden by the user, by
31 # providing the `-viewdir` parameter in the command line.
32 postPatch = ''
33+ substituteInPlace main.go --replace-fail \
34 "var viewDir = \".\"" \
35 "var viewDir = \"$out/share/honk\""
36 '';
···9}:
1011rustPlatform.buildRustPackage rec {
12- pname = "rustic-rs";
13 version = "0.7.0";
1415 src = fetchFromGitHub {
···19 hash = "sha256-jUAmboJTzX4oJZy9rFiPRbm94bVpZGa0SaqotoCU/Ss=";
20 };
2122- cargoHash = "sha256-iZuWlYDGGziwb49BfKdt9Ahs6oQ0Ij2iiT0tvL7ZIVk=";
2324 # At the time of writing, upstream defaults to "self-update" and "webdav".
25 # "self-update" is a self-updater, which we don't want in nixpkgs.
···9}:
1011rustPlatform.buildRustPackage rec {
12+ pname = "rustic";
13 version = "0.7.0";
1415 src = fetchFromGitHub {
···19 hash = "sha256-jUAmboJTzX4oJZy9rFiPRbm94bVpZGa0SaqotoCU/Ss=";
20 };
2122+ cargoHash = "sha256-8YGvxnwD9Vshah2jZ+XxOW0qB4nvWsOyLY1W8k+xQzU=";
2324 # At the time of writing, upstream defaults to "self-update" and "webdav".
25 # "self-update" is a self-updater, which we don't want in nixpkgs.