system.activationScripts
NixOS option
A set of shell script fragments that are executed when a NixOS system configuration is activated. Examples are updating /etc, creating accounts, and so on. Since these are executed every time you boot the system or run nixos-rebuild, it’s important that they are idempotent and fast.
type: attribute set of (string or (submodule))Default
{ }Example
declared in: nixos/modules/system/activation/activation-script.nixView source on NixOS/nixpkgs →{
stdio = {
# Run after /dev has been mounted
deps = [ "specialfs" ];
text =
''
# Needed by some programs.
ln -sfn /proc/self/fd /dev/fd
ln -sfn /proc/self/fd/0 /dev/stdin
ln -sfn /proc/self/fd/1 /dev/stdout
ln -sfn /proc/self/fd/2 /dev/stderr
'';
};
}