···
···
If set to false, this unit will be a symlink to
/dev/null. This is primarily useful to prevent specific
···
overrideStrategy = mkOption {
default = "asDropinIfExists";
type = types.enum [ "asDropinIfExists" "asDropin" ];
Defines how unit configuration is provided for systemd:
`asDropinIfExists` creates a unit file when no unit file is provided by the package
···
type = types.listOf unitNameType;
Units that require (i.e. depend on and need to go down with) this unit.
As discussed in the `wantedBy` option description this also creates
`.requires` symlinks automatically.
···
type = types.listOf unitNameType;
Keep this unit running as long as the listed units are running. This is a continuously
enforced version of wantedBy.
···
type = types.listOf unitNameType;
Units that want (i.e. depend on) this unit. The default method for
starting a unit by default at boot time is to set this option to
`["multi-user.target"]` for system services. Likewise for user units
···
type = types.listOf unitNameType;
-
description = mdDoc "Aliases of that unit.";
···
type = types.nullOr types.str;
-
description = mdDoc "Text of this systemd unit.";
-
description = mdDoc "The generated unit.";
···
type = types.singleLineStr;
-
description = mdDoc "Description of this unit used in systemd messages and progress indicators.";
documentation = mkOption {
type = types.listOf types.str;
-
description = mdDoc "A list of URIs referencing documentation for this unit or its configuration.";
type = types.listOf unitNameType;
Start the specified units when this unit is started, and stop
this unit when the specified units are stopped or fail.
···
type = types.listOf unitNameType;
Start the specified units when this unit is started.
···
type = types.listOf unitNameType;
Keeps the specified running while this unit is running. A continuous version of `wants`.
···
type = types.listOf unitNameType;
If the specified units are started at the same time as
this unit, delay this unit until they have started.
···
type = types.listOf unitNameType;
If the specified units are started at the same time as
this unit, delay them until this unit has started.
···
type = types.listOf unitNameType;
Like ‘requires’, but in addition, if the specified units
unexpectedly disappear, this unit will be stopped as well.
···
type = types.listOf unitNameType;
If the specified units are stopped or restarted, then this
unit is stopped or restarted as well.
···
type = types.listOf unitNameType;
If the specified units are started, then this unit is stopped
···
type = types.listOf unitNameType;
Similar to requires. However if the units listed are not started,
they will not be started and the transaction will fail.
···
example = { RequiresMountsFor = "/data"; };
type = types.attrsOf unitOption;
Each attribute in this set specifies an option in the
`[Unit]` section of the unit. See
{manpage}`systemd.unit(5)` for details.
···
type = types.listOf unitNameType;
A list of one or more units that are activated when
this unit enters the "failed" state.
···
type = types.listOf unitNameType;
A list of one or more units that are activated when
this unit enters the "inactive" state.
···
startLimitBurst = mkOption {
Configure unit start rate limiting. Units which are started
more than startLimitBurst times within an interval time
interval are not permitted to start any more.
···
startLimitIntervalSec = mkOption {
Configure unit start rate limiting. Units which are started
more than startLimitBurst times within an interval time
interval are not permitted to start any more.
···
restartTriggers = mkOption {
type = types.listOf types.unspecified;
An arbitrary list of items such as derivations. If any item
in the list changes between reconfigurations, the service will
···
reloadTriggers = mkOption {
type = types.listOf unitOption;
An arbitrary list of items such as derivations. If any item
in the list changes between reconfigurations, the service will
be reloaded. If anything but a reload trigger changes in the
···
type = with types; attrsOf (nullOr (oneOf [ str path package ]));
example = { PATH = "/foo/bar/bin"; LANG = "nl_NL.UTF-8"; };
-
description = mdDoc "Environment variables passed to the service's processes.";
type = with types; listOf (oneOf [ package str ]);
Packages added to the service's {env}`PATH`
environment variable. Both the {file}`bin`
and {file}`sbin` subdirectories of each
···
type = types.addCheck (types.attrsOf unitOption) checkService;
Each attribute in this set specifies an option in the
`[Service]` section of the unit. See
{manpage}`systemd.service(5)` for details.
···
-
description = mdDoc "Shell commands executed as the service's main process.";
Arguments passed to the main process script.
Can contain specifiers (`%` placeholders expanded by systemd, see {manpage}`systemd.unit(5)`).
···
Shell commands executed before the service's main process
···
Shell commands executed after the service's main process
···
Shell commands executed when the service's main process
···
Shell commands executed to stop the service.
···
Shell commands executed after the service's main process
···
type = with types; coercedTo path singleton (listOf path);
-
description = mdDoc "A list of all job script derivations of this unit.";
···
restartIfChanged = mkOption {
Whether the service should be restarted during a NixOS
configuration switch if its definition has changed.
···
reloadIfChanged = mkOption {
Whether the service should be reloaded during a NixOS
configuration switch if its definition has changed. If
enabled, the value of {option}`restartIfChanged` is
···
stopIfChanged = mkOption {
If set, a changed unit is restarted by calling
{command}`systemctl stop` in the old configuration,
then {command}`systemctl start` in the new one.
···
type = with types; either str (listOf str);
example = "Sun 14:00:00";
Automatically start this unit at the given date/time, which
must be in the format described in
{manpage}`systemd.time(7)`. This is equivalent
···
type = types.listOf types.str;
example = [ "0.0.0.0:993" "/run/my-socket" ];
For each item in this list, a `ListenStream`
option in the `[Socket]` section will be created.
···
type = types.listOf types.str;
example = [ "0.0.0.0:993" "/run/my-socket" ];
For each item in this list, a `ListenDatagram`
option in the `[Socket]` section will be created.
···
example = { ListenStream = "/run/my-socket"; };
type = types.attrsOf unitOption;
Each attribute in this set specifies an option in the
`[Socket]` section of the unit. See
{manpage}`systemd.socket(5)` for details.
···
example = { OnCalendar = "Sun 14:00:00"; Unit = "foo.service"; };
type = types.attrsOf unitOption;
Each attribute in this set specifies an option in the
`[Timer]` section of the unit. See
{manpage}`systemd.timer(5)` and
···
example = { PathChanged = "/some/path"; Unit = "changedpath.service"; };
type = types.attrsOf unitOption;
Each attribute in this set specifies an option in the
`[Path]` section of the unit. See
{manpage}`systemd.path(5)` for details.
···
-
description = mdDoc "Absolute path of device node, file or other resource. (Mandatory)";
Absolute path of a directory of the mount point.
Will be created if it doesn't exist. (Mandatory)
···
-
description = mdDoc "File system type.";
-
description = mdDoc "Options used to mount the file system.";
example = { DirectoryMode = "0775"; };
type = types.attrsOf unitOption;
Each attribute in this set specifies an option in the
`[Mount]` section of the unit. See
{manpage}`systemd.mount(5)` for details.
···
Absolute path of a directory of the mount point.
Will be created if it doesn't exist. (Mandatory)
···
example = { DirectoryMode = "0775"; };
type = types.attrsOf unitOption;
Each attribute in this set specifies an option in the
`[Automount]` section of the unit. See
{manpage}`systemd.automount(5)` for details.
···
example = { MemoryMax = "2G"; };
type = types.attrsOf unitOption;
Each attribute in this set specifies an option in the
`[Slice]` section of the unit. See
{manpage}`systemd.slice(5)` for details.