Skip to content

User

systemd.user.extraConfig

Extra config options for systemd user instances. See {manpage}systemd-user.conf(5) for available options.

Type: strings concatenated with "\n"

Default

""

Example

"DefaultCPUAccounting=yes"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.generators

Definition of systemd generators; see {manpage}systemd.generator(5).

For each NAME = VALUE pair of the attrSet, a link is generated from /etc/systemd/user-generators/NAME to VALUE.

Type: attribute set of path

Default

{ }

Example

{systemd-gpt-auto-generator = "/dev/null";}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.paths

Definition of systemd per-user path units. Type: attribute set of (submodule)

Default

{ }

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.paths.<name>.after

If the specified units are started at the same time as this unit, delay this unit until they have started.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.paths.<name>.aliases

Aliases of that unit. Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.paths.<name>.before

If the specified units are started at the same time as this unit, delay them until this unit has started.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.paths.<name>.bindsTo

Like ‘requires’, but in addition, if the specified units unexpectedly disappear, this unit will be stopped as well.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.paths.<name>.conflicts

If the specified units are started, then this unit is stopped and vice versa.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.paths.<name>.description

Description of this unit used in systemd messages and progress indicators. Type: (optionally newline-terminated) single-line string

Default

""

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.paths.<name>.documentation

A list of URIs referencing documentation for this unit or its configuration. Type: list of string

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.paths.<name>.enable

If set to false, this unit will be a symlink to /dev/null. This is primarily useful to prevent specific template instances (e.g. serial-getty@ttyS0) from being started. Note that enable=true does not make a unit start by default at boot; if you want that, see wantedBy.

Type: boolean

Default

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.paths.<name>.name

The name of this systemd unit, including its extension. This can be used to refer to this unit from other systemd units.

Type: string

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.paths.<name>.onFailure

A list of one or more units that are activated when this unit enters the "failed" state.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.paths.<name>.onSuccess

A list of one or more units that are activated when this unit enters the "inactive" state.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.paths.<name>.overrideStrategy

Defines how unit configuration is provided for systemd:

asDropinIfExists creates a unit file when no unit file is provided by the package otherwise a drop-in file name overrides.conf.

asDropin creates a drop-in file named overrides.conf. Mainly needed to define instances for systemd template units (e.g. systemd-nspawn@mycontainer.service).

See also {manpage}systemd.unit(5).

Type: one of "asDropinIfExists", "asDropin"

Default

"asDropinIfExists"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.paths.<name>.partOf

If the specified units are stopped or restarted, then this unit is stopped or restarted as well.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.paths.<name>.pathConfig

Each attribute in this set specifies an option in the [Path] section of the unit. See {manpage}systemd.path(5) for details.

Type: attribute set of (systemd option)

Default

{ }

Example

{PathChanged = "/some/path";Unit = "changedpath.service";}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.paths.<name>.reloadTriggers

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 unit file, the unit will be restarted instead.

Type: list of (systemd option)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.paths.<name>.requiredBy

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: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.paths.<name>.requires

Start the specified units when this unit is started, and stop this unit when the specified units are stopped or fail.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.paths.<name>.requisite

Similar to requires. However if the units listed are not started, they will not be started and the transaction will fail.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.paths.<name>.restartTriggers

An arbitrary list of items such as derivations. If any item in the list changes between reconfigurations, the service will be restarted.

Type: list of unspecified value

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.paths.<name>.startLimitBurst

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.

Type: signed integer

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.paths.<name>.startLimitIntervalSec

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.

Type: signed integer

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.paths.<name>.unitConfig

Each attribute in this set specifies an option in the [Unit] section of the unit. See {manpage}systemd.unit(5) for details.

Type: attribute set of (systemd option)

Default

{ }

Example

{RequiresMountsFor = "/data";}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.paths.<name>.upheldBy

Keep this unit running as long as the listed units are running. This is a continuously enforced version of wantedBy.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.paths.<name>.upholds

Keeps the specified running while this unit is running. A continuous version of wants.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.paths.<name>.wantedBy

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 (systemd.user.<name>.*) set it to ["default.target"] to make a unit start by default when the user <name> logs on.

This option creates a .wants symlink in the given target that exists statelessly without the need for running systemctl enable. The [Install] section described in {manpage}systemd.unit(5) however is not supported because it is a stateful process that does not fit well into the NixOS design.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.paths.<name>.wants

Start the specified units when this unit is started.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services

Definition of systemd per-user service units. Type: attribute set of (submodule)

Default

{ }

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.after

If the specified units are started at the same time as this unit, delay this unit until they have started.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.aliases

Aliases of that unit. Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.before

If the specified units are started at the same time as this unit, delay them until this unit has started.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.bindsTo

Like ‘requires’, but in addition, if the specified units unexpectedly disappear, this unit will be stopped as well.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.conflicts

If the specified units are started, then this unit is stopped and vice versa.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.description

Description of this unit used in systemd messages and progress indicators. Type: (optionally newline-terminated) single-line string

Default

""

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.documentation

A list of URIs referencing documentation for this unit or its configuration. Type: list of string

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.enable

If set to false, this unit will be a symlink to /dev/null. This is primarily useful to prevent specific template instances (e.g. serial-getty@ttyS0) from being started. Note that enable=true does not make a unit start by default at boot; if you want that, see wantedBy.

Type: boolean

Default

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.environment

Environment variables passed to the service's processes. Type: attribute set of (null or string or path or package)

Default

{ }

Example

{LANG = "nl_NL.UTF-8";PATH = "/foo/bar/bin";}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.name

The name of this systemd unit, including its extension. This can be used to refer to this unit from other systemd units.

Type: string

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.onFailure

A list of one or more units that are activated when this unit enters the "failed" state.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.onSuccess

A list of one or more units that are activated when this unit enters the "inactive" state.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.overrideStrategy

Defines how unit configuration is provided for systemd:

asDropinIfExists creates a unit file when no unit file is provided by the package otherwise a drop-in file name overrides.conf.

asDropin creates a drop-in file named overrides.conf. Mainly needed to define instances for systemd template units (e.g. systemd-nspawn@mycontainer.service).

See also {manpage}systemd.unit(5).

Type: one of "asDropinIfExists", "asDropin"

Default

"asDropinIfExists"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.partOf

If the specified units are stopped or restarted, then this unit is stopped or restarted as well.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.path

Packages added to the service's {env}PATH environment variable. Both the {file}bin and {file}sbin subdirectories of each package are added.

Type: list of (package or string)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.postStart

Shell commands executed after the service's main process is started.

Type: strings concatenated with "\n"

Default

""

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.postStop

Shell commands executed after the service's main process has exited.

Type: strings concatenated with "\n"

Default

""

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.preStart

Shell commands executed before the service's main process is started.

Type: strings concatenated with "\n"

Default

""

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.preStop

Shell commands executed to stop the service.

Type: strings concatenated with "\n"

Default

""

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.reload

Shell commands executed when the service's main process is reloaded.

Type: strings concatenated with "\n"

Default

""

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.reloadIfChanged

Whether the service should be reloaded during a NixOS configuration switch if its definition has changed. If enabled, the value of {option}restartIfChanged is ignored.

This option should not be used anymore in favor of {option}reloadTriggers which allows more granular control of when a service is reloaded and when a service is restarted.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.reloadTriggers

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 unit file, the unit will be restarted instead.

Type: list of (systemd option)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.requiredBy

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: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.requires

Start the specified units when this unit is started, and stop this unit when the specified units are stopped or fail.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.requisite

Similar to requires. However if the units listed are not started, they will not be started and the transaction will fail.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.restartIfChanged

Whether the service should be restarted during a NixOS configuration switch if its definition has changed.

Type: boolean

Default

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.restartTriggers

An arbitrary list of items such as derivations. If any item in the list changes between reconfigurations, the service will be restarted.

Type: list of unspecified value

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.script

Shell commands executed as the service's main process. Type: strings concatenated with "\n"

Default

""

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.scriptArgs

Arguments passed to the main process script. Can contain specifiers (% placeholders expanded by systemd, see {manpage}systemd.unit(5)).

Type: string

Default

""

Example

"%i"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.serviceConfig

Each attribute in this set specifies an option in the [Service] section of the unit. See {manpage}systemd.service(5) for details.

Type: attribute set of (systemd option)

Default

{ }

Example

{RestartSec = 5;}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.startAt

Automatically start this unit at the given date/time, which must be in the format described in {manpage}systemd.time(7). This is equivalent to adding a corresponding timer unit with {option}OnCalendar set to the value given here.

Type: string or list of string

Default

[ ]

Example

"Sun 14:00:00"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.startLimitBurst

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.

Type: signed integer

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.startLimitIntervalSec

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.

Type: signed integer

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.stopIfChanged

If set, a changed unit is restarted by calling {command}systemctl stop in the old configuration, then {command}systemctl start in the new one. Otherwise, it is restarted in a single step using {command}systemctl restart in the new configuration. The latter is less correct because it runs the ExecStop commands from the new configuration.

Type: boolean

Default

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.unitConfig

Each attribute in this set specifies an option in the [Unit] section of the unit. See {manpage}systemd.unit(5) for details.

Type: attribute set of (systemd option)

Default

{ }

Example

{RequiresMountsFor = "/data";}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.upheldBy

Keep this unit running as long as the listed units are running. This is a continuously enforced version of wantedBy.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.upholds

Keeps the specified running while this unit is running. A continuous version of wants.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.wantedBy

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 (systemd.user.<name>.*) set it to ["default.target"] to make a unit start by default when the user <name> logs on.

This option creates a .wants symlink in the given target that exists statelessly without the need for running systemctl enable. The [Install] section described in {manpage}systemd.unit(5) however is not supported because it is a stateful process that does not fit well into the NixOS design.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.services.<name>.wants

Start the specified units when this unit is started.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.slices

Definition of systemd per-user slice units. Type: attribute set of (submodule)

Default

{ }

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.slices.<name>.after

If the specified units are started at the same time as this unit, delay this unit until they have started.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.slices.<name>.aliases

Aliases of that unit. Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.slices.<name>.before

If the specified units are started at the same time as this unit, delay them until this unit has started.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.slices.<name>.bindsTo

Like ‘requires’, but in addition, if the specified units unexpectedly disappear, this unit will be stopped as well.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.slices.<name>.conflicts

If the specified units are started, then this unit is stopped and vice versa.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.slices.<name>.description

Description of this unit used in systemd messages and progress indicators. Type: (optionally newline-terminated) single-line string

Default

""

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.slices.<name>.documentation

A list of URIs referencing documentation for this unit or its configuration. Type: list of string

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.slices.<name>.enable

If set to false, this unit will be a symlink to /dev/null. This is primarily useful to prevent specific template instances (e.g. serial-getty@ttyS0) from being started. Note that enable=true does not make a unit start by default at boot; if you want that, see wantedBy.

Type: boolean

Default

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.slices.<name>.name

The name of this systemd unit, including its extension. This can be used to refer to this unit from other systemd units.

Type: string

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.slices.<name>.onFailure

A list of one or more units that are activated when this unit enters the "failed" state.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.slices.<name>.onSuccess

A list of one or more units that are activated when this unit enters the "inactive" state.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.slices.<name>.overrideStrategy

Defines how unit configuration is provided for systemd:

asDropinIfExists creates a unit file when no unit file is provided by the package otherwise a drop-in file name overrides.conf.

asDropin creates a drop-in file named overrides.conf. Mainly needed to define instances for systemd template units (e.g. systemd-nspawn@mycontainer.service).

See also {manpage}systemd.unit(5).

Type: one of "asDropinIfExists", "asDropin"

Default

"asDropinIfExists"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.slices.<name>.partOf

If the specified units are stopped or restarted, then this unit is stopped or restarted as well.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.slices.<name>.reloadTriggers

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 unit file, the unit will be restarted instead.

Type: list of (systemd option)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.slices.<name>.requiredBy

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: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.slices.<name>.requires

Start the specified units when this unit is started, and stop this unit when the specified units are stopped or fail.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.slices.<name>.requisite

Similar to requires. However if the units listed are not started, they will not be started and the transaction will fail.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.slices.<name>.restartTriggers

An arbitrary list of items such as derivations. If any item in the list changes between reconfigurations, the service will be restarted.

Type: list of unspecified value

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.slices.<name>.sliceConfig

Each attribute in this set specifies an option in the [Slice] section of the unit. See {manpage}systemd.slice(5) for details.

Type: attribute set of (systemd option)

Default

{ }

Example

{MemoryMax = "2G";}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.slices.<name>.startLimitBurst

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.

Type: signed integer

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.slices.<name>.startLimitIntervalSec

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.

Type: signed integer

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.slices.<name>.unitConfig

Each attribute in this set specifies an option in the [Unit] section of the unit. See {manpage}systemd.unit(5) for details.

Type: attribute set of (systemd option)

Default

{ }

Example

{RequiresMountsFor = "/data";}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.slices.<name>.upheldBy

Keep this unit running as long as the listed units are running. This is a continuously enforced version of wantedBy.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.slices.<name>.upholds

Keeps the specified running while this unit is running. A continuous version of wants.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.slices.<name>.wantedBy

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 (systemd.user.<name>.*) set it to ["default.target"] to make a unit start by default when the user <name> logs on.

This option creates a .wants symlink in the given target that exists statelessly without the need for running systemctl enable. The [Install] section described in {manpage}systemd.unit(5) however is not supported because it is a stateful process that does not fit well into the NixOS design.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.slices.<name>.wants

Start the specified units when this unit is started.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.sockets

Definition of systemd per-user socket units. Type: attribute set of (submodule)

Default

{ }

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.sockets.<name>.after

If the specified units are started at the same time as this unit, delay this unit until they have started.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.sockets.<name>.aliases

Aliases of that unit. Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.sockets.<name>.before

If the specified units are started at the same time as this unit, delay them until this unit has started.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.sockets.<name>.bindsTo

Like ‘requires’, but in addition, if the specified units unexpectedly disappear, this unit will be stopped as well.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.sockets.<name>.conflicts

If the specified units are started, then this unit is stopped and vice versa.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.sockets.<name>.description

Description of this unit used in systemd messages and progress indicators. Type: (optionally newline-terminated) single-line string

Default

""

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.sockets.<name>.documentation

A list of URIs referencing documentation for this unit or its configuration. Type: list of string

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.sockets.<name>.enable

If set to false, this unit will be a symlink to /dev/null. This is primarily useful to prevent specific template instances (e.g. serial-getty@ttyS0) from being started. Note that enable=true does not make a unit start by default at boot; if you want that, see wantedBy.

Type: boolean

Default

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.sockets.<name>.listenDatagrams

For each item in this list, a ListenDatagram option in the [Socket] section will be created.

Type: list of string

Default

[ ]

Example

["0.0.0.0:993""/run/my-socket"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.sockets.<name>.listenStreams

For each item in this list, a ListenStream option in the [Socket] section will be created.

Type: list of string

Default

[ ]

Example

["0.0.0.0:993""/run/my-socket"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.sockets.<name>.name

The name of this systemd unit, including its extension. This can be used to refer to this unit from other systemd units.

Type: string

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.sockets.<name>.onFailure

A list of one or more units that are activated when this unit enters the "failed" state.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.sockets.<name>.onSuccess

A list of one or more units that are activated when this unit enters the "inactive" state.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.sockets.<name>.overrideStrategy

Defines how unit configuration is provided for systemd:

asDropinIfExists creates a unit file when no unit file is provided by the package otherwise a drop-in file name overrides.conf.

asDropin creates a drop-in file named overrides.conf. Mainly needed to define instances for systemd template units (e.g. systemd-nspawn@mycontainer.service).

See also {manpage}systemd.unit(5).

Type: one of "asDropinIfExists", "asDropin"

Default

"asDropinIfExists"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.sockets.<name>.partOf

If the specified units are stopped or restarted, then this unit is stopped or restarted as well.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.sockets.<name>.reloadTriggers

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 unit file, the unit will be restarted instead.

Type: list of (systemd option)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.sockets.<name>.requiredBy

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: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.sockets.<name>.requires

Start the specified units when this unit is started, and stop this unit when the specified units are stopped or fail.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.sockets.<name>.requisite

Similar to requires. However if the units listed are not started, they will not be started and the transaction will fail.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.sockets.<name>.restartTriggers

An arbitrary list of items such as derivations. If any item in the list changes between reconfigurations, the service will be restarted.

Type: list of unspecified value

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.sockets.<name>.socketConfig

Each attribute in this set specifies an option in the [Socket] section of the unit. See {manpage}systemd.socket(5) for details.

Type: attribute set of (systemd option)

Default

{ }

Example

{ListenStream = "/run/my-socket";}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.sockets.<name>.startLimitBurst

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.

Type: signed integer

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.sockets.<name>.startLimitIntervalSec

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.

Type: signed integer

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.sockets.<name>.unitConfig

Each attribute in this set specifies an option in the [Unit] section of the unit. See {manpage}systemd.unit(5) for details.

Type: attribute set of (systemd option)

Default

{ }

Example

{RequiresMountsFor = "/data";}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.sockets.<name>.upheldBy

Keep this unit running as long as the listed units are running. This is a continuously enforced version of wantedBy.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.sockets.<name>.upholds

Keeps the specified running while this unit is running. A continuous version of wants.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.sockets.<name>.wantedBy

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 (systemd.user.<name>.*) set it to ["default.target"] to make a unit start by default when the user <name> logs on.

This option creates a .wants symlink in the given target that exists statelessly without the need for running systemctl enable. The [Install] section described in {manpage}systemd.unit(5) however is not supported because it is a stateful process that does not fit well into the NixOS design.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.sockets.<name>.wants

Start the specified units when this unit is started.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.targets

Definition of systemd per-user target units. Type: attribute set of (submodule)

Default

{ }

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.targets.<name>.after

If the specified units are started at the same time as this unit, delay this unit until they have started.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.targets.<name>.aliases

Aliases of that unit. Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.targets.<name>.before

If the specified units are started at the same time as this unit, delay them until this unit has started.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.targets.<name>.bindsTo

Like ‘requires’, but in addition, if the specified units unexpectedly disappear, this unit will be stopped as well.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.targets.<name>.conflicts

If the specified units are started, then this unit is stopped and vice versa.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.targets.<name>.description

Description of this unit used in systemd messages and progress indicators. Type: (optionally newline-terminated) single-line string

Default

""

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.targets.<name>.documentation

A list of URIs referencing documentation for this unit or its configuration. Type: list of string

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.targets.<name>.enable

If set to false, this unit will be a symlink to /dev/null. This is primarily useful to prevent specific template instances (e.g. serial-getty@ttyS0) from being started. Note that enable=true does not make a unit start by default at boot; if you want that, see wantedBy.

Type: boolean

Default

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.targets.<name>.name

The name of this systemd unit, including its extension. This can be used to refer to this unit from other systemd units.

Type: string

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.targets.<name>.onFailure

A list of one or more units that are activated when this unit enters the "failed" state.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.targets.<name>.onSuccess

A list of one or more units that are activated when this unit enters the "inactive" state.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.targets.<name>.overrideStrategy

Defines how unit configuration is provided for systemd:

asDropinIfExists creates a unit file when no unit file is provided by the package otherwise a drop-in file name overrides.conf.

asDropin creates a drop-in file named overrides.conf. Mainly needed to define instances for systemd template units (e.g. systemd-nspawn@mycontainer.service).

See also {manpage}systemd.unit(5).

Type: one of "asDropinIfExists", "asDropin"

Default

"asDropinIfExists"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.targets.<name>.partOf

If the specified units are stopped or restarted, then this unit is stopped or restarted as well.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.targets.<name>.reloadTriggers

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 unit file, the unit will be restarted instead.

Type: list of (systemd option)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.targets.<name>.requiredBy

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: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.targets.<name>.requires

Start the specified units when this unit is started, and stop this unit when the specified units are stopped or fail.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.targets.<name>.requisite

Similar to requires. However if the units listed are not started, they will not be started and the transaction will fail.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.targets.<name>.restartTriggers

An arbitrary list of items such as derivations. If any item in the list changes between reconfigurations, the service will be restarted.

Type: list of unspecified value

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.targets.<name>.startLimitBurst

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.

Type: signed integer

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.targets.<name>.startLimitIntervalSec

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.

Type: signed integer

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.targets.<name>.unitConfig

Each attribute in this set specifies an option in the [Unit] section of the unit. See {manpage}systemd.unit(5) for details.

Type: attribute set of (systemd option)

Default

{ }

Example

{RequiresMountsFor = "/data";}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.targets.<name>.upheldBy

Keep this unit running as long as the listed units are running. This is a continuously enforced version of wantedBy.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.targets.<name>.upholds

Keeps the specified running while this unit is running. A continuous version of wants.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.targets.<name>.wantedBy

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 (systemd.user.<name>.*) set it to ["default.target"] to make a unit start by default when the user <name> logs on.

This option creates a .wants symlink in the given target that exists statelessly without the need for running systemctl enable. The [Install] section described in {manpage}systemd.unit(5) however is not supported because it is a stateful process that does not fit well into the NixOS design.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.targets.<name>.wants

Start the specified units when this unit is started.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.timers

Definition of systemd per-user timer units. Type: attribute set of (submodule)

Default

{ }

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.timers.<name>.after

If the specified units are started at the same time as this unit, delay this unit until they have started.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.timers.<name>.aliases

Aliases of that unit. Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.timers.<name>.before

If the specified units are started at the same time as this unit, delay them until this unit has started.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.timers.<name>.bindsTo

Like ‘requires’, but in addition, if the specified units unexpectedly disappear, this unit will be stopped as well.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.timers.<name>.conflicts

If the specified units are started, then this unit is stopped and vice versa.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.timers.<name>.description

Description of this unit used in systemd messages and progress indicators. Type: (optionally newline-terminated) single-line string

Default

""

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.timers.<name>.documentation

A list of URIs referencing documentation for this unit or its configuration. Type: list of string

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.timers.<name>.enable

If set to false, this unit will be a symlink to /dev/null. This is primarily useful to prevent specific template instances (e.g. serial-getty@ttyS0) from being started. Note that enable=true does not make a unit start by default at boot; if you want that, see wantedBy.

Type: boolean

Default

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.timers.<name>.name

The name of this systemd unit, including its extension. This can be used to refer to this unit from other systemd units.

Type: string

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.timers.<name>.onFailure

A list of one or more units that are activated when this unit enters the "failed" state.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.timers.<name>.onSuccess

A list of one or more units that are activated when this unit enters the "inactive" state.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.timers.<name>.overrideStrategy

Defines how unit configuration is provided for systemd:

asDropinIfExists creates a unit file when no unit file is provided by the package otherwise a drop-in file name overrides.conf.

asDropin creates a drop-in file named overrides.conf. Mainly needed to define instances for systemd template units (e.g. systemd-nspawn@mycontainer.service).

See also {manpage}systemd.unit(5).

Type: one of "asDropinIfExists", "asDropin"

Default

"asDropinIfExists"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.timers.<name>.partOf

If the specified units are stopped or restarted, then this unit is stopped or restarted as well.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.timers.<name>.reloadTriggers

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 unit file, the unit will be restarted instead.

Type: list of (systemd option)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.timers.<name>.requiredBy

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: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.timers.<name>.requires

Start the specified units when this unit is started, and stop this unit when the specified units are stopped or fail.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.timers.<name>.requisite

Similar to requires. However if the units listed are not started, they will not be started and the transaction will fail.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.timers.<name>.restartTriggers

An arbitrary list of items such as derivations. If any item in the list changes between reconfigurations, the service will be restarted.

Type: list of unspecified value

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.timers.<name>.startLimitBurst

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.

Type: signed integer

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.timers.<name>.startLimitIntervalSec

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.

Type: signed integer

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.timers.<name>.timerConfig

Each attribute in this set specifies an option in the [Timer] section of the unit. See {manpage}systemd.timer(5) and {manpage}systemd.time(7) for details.

Type: attribute set of (systemd option)

Default

{ }

Example

{OnCalendar = "Sun 14:00:00";Unit = "foo.service";}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.timers.<name>.unitConfig

Each attribute in this set specifies an option in the [Unit] section of the unit. See {manpage}systemd.unit(5) for details.

Type: attribute set of (systemd option)

Default

{ }

Example

{RequiresMountsFor = "/data";}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.timers.<name>.upheldBy

Keep this unit running as long as the listed units are running. This is a continuously enforced version of wantedBy.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.timers.<name>.upholds

Keeps the specified running while this unit is running. A continuous version of wants.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.timers.<name>.wantedBy

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 (systemd.user.<name>.*) set it to ["default.target"] to make a unit start by default when the user <name> logs on.

This option creates a .wants symlink in the given target that exists statelessly without the need for running systemctl enable. The [Install] section described in {manpage}systemd.unit(5) however is not supported because it is a stateful process that does not fit well into the NixOS design.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.timers.<name>.wants

Start the specified units when this unit is started.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.tmpfiles.rules

Global user rules for creation, deletion and cleaning of volatile and temporary files automatically. See {manpage}tmpfiles.d(5) for the exact format.

Type: list of string

Default

[ ]

Example

["D %C - - - 7d"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.tmpfiles.users

Per-user rules for creation, deletion and cleaning of volatile and temporary files automatically.

Type: attribute set of (submodule)

Default

{ }

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.tmpfiles.users.<name>.rules

Per-user rules for creation, deletion and cleaning of volatile and temporary files automatically. See {manpage}tmpfiles.d(5) for the exact format.

Type: list of string

Default

[ ]

Example

["D %C - - - 7d"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.units

Definition of systemd per-user units. Type: attribute set of (submodule)

Default

{ }

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.units.<name>.aliases

Aliases of that unit. Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.units.<name>.enable

If set to false, this unit will be a symlink to /dev/null. This is primarily useful to prevent specific template instances (e.g. serial-getty@ttyS0) from being started. Note that enable=true does not make a unit start by default at boot; if you want that, see wantedBy.

Type: boolean

Default

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.units.<name>.name

The name of this systemd unit, including its extension. This can be used to refer to this unit from other systemd units.

Type: string

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.units.<name>.overrideStrategy

Defines how unit configuration is provided for systemd:

asDropinIfExists creates a unit file when no unit file is provided by the package otherwise a drop-in file name overrides.conf.

asDropin creates a drop-in file named overrides.conf. Mainly needed to define instances for systemd template units (e.g. systemd-nspawn@mycontainer.service).

See also {manpage}systemd.unit(5).

Type: one of "asDropinIfExists", "asDropin"

Default

"asDropinIfExists"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.units.<name>.requiredBy

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: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.units.<name>.text

Text of this systemd unit. Type: null or string

Default

null

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.units.<name>.upheldBy

Keep this unit running as long as the listed units are running. This is a continuously enforced version of wantedBy.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix

systemd.user.units.<name>.wantedBy

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 (systemd.user.<name>.*) set it to ["default.target"] to make a unit start by default when the user <name> logs on.

This option creates a .wants symlink in the given target that exists statelessly without the need for running systemctl enable. The [Install] section described in {manpage}systemd.unit(5) however is not supported because it is a stateful process that does not fit well into the NixOS design.

Type: list of string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/systemd/user.nix