Skip to content

Commit df8e6f7

Browse files
committed
system/activation: mention deps attr in activationScripts example
As it helps making deps easier to discover - as we don't currently render submodule options in the module correctly - and is arguably more technical correct: When using nixos-install to install nixos into a chroot in i.e. /mnt, there's no gurantee that /mnt/dev exists before the specialfs phase ran.
1 parent 0196889 commit df8e6f7

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

nixos/modules/system/activation/activation-script.nix

+13-8
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,19 @@ in
110110
default = {};
111111

112112
example = literalExpression ''
113-
{ stdio.text =
114-
'''
115-
# Needed by some programs.
116-
ln -sfn /proc/self/fd /dev/fd
117-
ln -sfn /proc/self/fd/0 /dev/stdin
118-
ln -sfn /proc/self/fd/1 /dev/stdout
119-
ln -sfn /proc/self/fd/2 /dev/stderr
120-
''';
113+
{
114+
stdio = {
115+
# Run after /dev has been mounted
116+
deps = [ "specialfs" ];
117+
text =
118+
'''
119+
# Needed by some programs.
120+
ln -sfn /proc/self/fd /dev/fd
121+
ln -sfn /proc/self/fd/0 /dev/stdin
122+
ln -sfn /proc/self/fd/1 /dev/stdout
123+
ln -sfn /proc/self/fd/2 /dev/stderr
124+
''';
125+
};
121126
}
122127
'';
123128

0 commit comments

Comments
 (0)