nixos/systemd: clarify what enableStrictShellChecks checks

the specifics of this option are in the release notes, but bring
them into the documentation.
This commit is contained in:
Scott Edlund 2025-04-24 22:07:40 +08:00
parent dfe7beec10
commit 02555cd0bd
2 changed files with 41 additions and 4 deletions

View file

@ -398,9 +398,21 @@ rec {
enableStrictShellChecks = mkOption {
type = types.bool;
description = "Enable running shellcheck on the generated scripts for this unit.";
# The default gets set in systemd-lib.nix because we don't have access to
# the full NixOS config here.
description = ''
Enable running `shellcheck` on the generated scripts for this unit.
When enabled, scripts generated by the unit will be checked with
`shellcheck` and any errors or warnings will cause the build to
fail.
This affects all scripts that have been created through the
`script`, `reload`, `preStart`, `postStart`, `preStop` and
`postStop` options for systemd services. This does not affect
command lines passed directly to `ExecStart`, `ExecReload`,
`ExecStartPre`, `ExecStartPost`, `ExecStop` or `ExecStopPost`.
'';
# The default gets set in systemd-lib.nix because we don't have
# access to the full NixOS config here.
defaultText = literalExpression "config.systemd.enableStrictShellChecks";
};