···
type = types.listOf unitNameType;
description = lib.mdDoc ''
71
-
Units that require (i.e. depend on and need to go down with)
72
-
this unit. The discussion under `wantedBy`
73
-
applies here as well: inverse `.requires`
74
-
symlinks are established.
71
+
Units that require (i.e. depend on and need to go down with) this unit.
72
+
As discussed in the `wantedBy` option description this also creates
73
+
`.requires` symlinks automatically.
···
type = types.listOf unitNameType;
description = lib.mdDoc ''
82
-
Units that want (i.e. depend on) this unit. The standard way
83
-
to make a unit start by default at boot is to set this option
84
-
to `[ "multi-user.target" ]`. That's despite
85
-
the fact that the systemd.unit(5) manpage says this option
86
-
goes in the `[Install]` section that controls
87
-
the behaviour of `systemctl enable`. Since
88
-
such a process is stateful and thus contrary to the design of
89
-
NixOS, setting this option instead causes the equivalent
90
-
inverse `.wants` symlink to be present,
91
-
establishing the same desired relationship in a stateless way.
81
+
Units that want (i.e. depend on) this unit. The default method for
82
+
starting a unit by default at boot time is to set this option to
83
+
'["multi-user.target"]' for system services. Likewise for user units
84
+
(`systemd.user.<name>.*`) set it to `["default.target"]` to make a unit
85
+
start by default when the user `<name>` logs on.
87
+
This option creates a `.wants` symlink in the given target that exists
88
+
statelessly without the need for running `systemctl enable`.
89
+
The in systemd.unit(5) manpage described `[Install]` section however is
90
+
not supported because it is a stateful process that does not fit well
91
+
into the NixOS design.