From 713607abea89c61d29b2b621e14a1f08f2168df9 Mon Sep 17 00:00:00 2001 From: r-vdp Date: Tue, 28 Jan 2025 12:00:10 +0100 Subject: [PATCH] nixos/activation: document the arguments that are passed to the pre-switch-check script --- nixos/modules/system/activation/pre-switch-check.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nixos/modules/system/activation/pre-switch-check.nix b/nixos/modules/system/activation/pre-switch-check.nix index e8640a0db3f2..2b53e390b19d 100644 --- a/nixos/modules/system/activation/pre-switch-check.nix +++ b/nixos/modules/system/activation/pre-switch-check.nix @@ -44,6 +44,9 @@ in A set of shell script fragments that are executed before the switch to a new NixOS system configuration. A failure in any of these fragments will cause the switch to fail and exit early. + The scripts receive the new configuration path and the action verb passed + to switch-to-configuration, as the first and second positional arguments + (meaning that you can access them using `$1` and `$2`, respectively). ''; type = lib.types.attrsOf lib.types.str;