Hjem Options

hjem.clobberByDefault Link copied!

Type: boolean

The default override behaviour for files managed by Hjem.

While true, existing files will be overriden with new files on rebuild. The behaviour may be modified per-user by setting hjem.users.<name>.clobberFiles to the desired value.

Default: false

hjem.extraModules Link copied!

Type: list of raw value

Additional modules to be evaluated as a part of the users module inside config.hjem.users.<name>. This can be used to extend each user configuration with additional options.

Default: [ ]

hjem.linker Link copied!

Type: null or package

Method to use to link files.

null will use systemd-tmpfiles, which is only supported on Linux.

This is the default file linker on Linux, as it is the more mature linker, but it has the downside of leaving behind symlinks that may not get invalidated until the next GC, if an entry is removed from hjem.<user>.files.

Specifying a package will use a custom file linker that uses an internally-generated manifest. The custom file linker must use this manifest to create or remove links as needed, by comparing the manifest of the currently activated system with that of the new system. This prevents dangling symlinks when an entry is removed from hjem.<user>.files.

Note

This linker is currently experimental; once it matures, it may become the default in the future.

Default: null

hjem.linkerOptions Link copied!

Type: (list of (optionally newline-terminated) single-line string) or (attribute set)

Additional arguments to pass to the linker.

This is for external linker modules to set, to allow extending the default set of hjem behaviours. It accepts either a list of strings, which will be passed directly as arguments, or an attribute set, which will be serialized to JSON and passed as --linker-opts options.json.

Default: [ ]

hjem.specialArgs Link copied!

Type: attribute set

Additional specialArgs are passed to Hjem, allowing extra arguments to be passed down to to all imported modules.

Default: { }
Example: { inherit inputs; }

hjem.users Link copied!

Type: attribute set of (Hjem NixOS module.)

Hjem-managed user configurations.

Default: { }

hjem.users.<name>.clobberFiles Link copied!

Type: boolean

The default override behaviour for files managed by Hjem for a particular user.

A top level option exists under the Hjem module option hjem.clobberByDefault. Per-file behaviour can be modified with hjem.users.<name>.files.<file>.clobber.

Example: true

hjem.users.<name>.directory Link copied!

Type: absolute path

The home directory for the user, to which files configured in hjem.users.<name>.files will be relative to by default.

hjem.users.<name>.enable Link copied!

Type: boolean

Whether to enable home management for this user.

Default: true
Example: false

hjem.users.<name>.environment.loadEnv Link copied!

Type: absolute path

A POSIX compliant shell script containing the user session variables needed to bootstrap the session.

As there is no reliable and agnostic way of setting session variables, Hjem's environment module does nothing by itself. Rather, it provides a POSIX compliant shell script that needs to be sourced where needed.

hjem.users.<name>.environment.sessionVariables Link copied!

Type: attribute set of (null or (list of (signed integer or string or absolute path)) or signed integer or string or absolute path)

A set of environment variables used in the user environment. If a list of strings is used, they will be concatenated with colon characters.

Default: { }
Example:
{
  EDITOR = "nvim";
  VISUAL = "nvim";
}

hjem.users.<name>.files Link copied!

Type: attribute set of (submodule)

Hjem-managed files.

Default: { }
Example:
{
  ".config/foo.txt" = {
    source = "Hello World";
  };
}

hjem.users.<name>.files.<name>.clobber Link copied!

Type: boolean

Whether to "clobber" existing target paths.

  • If using the systemd-tmpfiles hook (Linux only), tmpfile rules will be constructed with L+ (recreate) instead of L (create) type while this is set to true.
Default: config.hjem.users.‹name›.clobberFiles

hjem.users.<name>.files.<name>.enable Link copied!

Type: boolean

Whether to enable creation of this file.

Default: true
Example: false

hjem.users.<name>.files.<name>.executable Link copied!

Type: boolean

Whether to set the execute bit on the target file.

Default: false
Example: true

hjem.users.<name>.files.<name>.generator Link copied!

Type: null or (function that evaluates to a(n) (null or absolute path or null or strings concatenated with "\n"))

Function that when applied to value will create the source or text of the file.

Detection is automatic, as we check if the generator generates a derivation or a string after applying to value.

Default: null
Example: lib.generators.toGitINI

hjem.users.<name>.files.<name>.gid Link copied!

Type: null or string

Group ID to set as owner on the target path.

Default: null

hjem.users.<name>.files.<name>.permissions Link copied!

Type: null or string

Permissions (in octal) to set on the target path.

Default: null

hjem.users.<name>.files.<name>.source Link copied!

Type: null or absolute path

Path of the source file or directory.

Default: null

hjem.users.<name>.files.<name>.target Link copied!

Type: string

Path to target file relative to /home/‹name›.

Default: "‹name›"

hjem.users.<name>.files.<name>.text Link copied!

Type: null or strings concatenated with "\n"

Text of the file.

Default: null

hjem.users.<name>.files.<name>.type Link copied!

Type: one of "symlink", "copy", "delete", "directory", "modify"

Type of path to create.

Default: "symlink"

hjem.users.<name>.files.<name>.uid Link copied!

Type: null or string

User ID to set as owner on the target path.

Default: null

hjem.users.<name>.files.<name>.value Link copied!

Type: null or (attribute set of anything)

Value passed to the generator.

Default: null
Example:
{
  user = {
    email = "me@example.com";
  };
}

hjem.users.<name>.packages Link copied!

Type: list of package

Packages to install for this user.

Default: [ ]
Example: [pkgs.hello]

hjem.users.<name>.systemd.enable Link copied!

Type: boolean

Whether to enable Hjem management of systemd units.

Default: true
Example: false

hjem.users.<name>.systemd.paths Link copied!

Type: attribute set of (submodule)

Definition of systemd per-user path units.

Default: { }

hjem.users.<name>.systemd.paths.<name>.after Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.paths.<name>.aliases Link copied!

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

Aliases of that unit.

Default: [ ]

hjem.users.<name>.systemd.paths.<name>.before Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.paths.<name>.bindsTo Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.paths.<name>.conflicts Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.paths.<name>.description Link copied!

Type: (optionally newline-terminated) single-line string

Description of this unit used in systemd messages and progress indicators.

Default: ""

hjem.users.<name>.systemd.paths.<name>.documentation Link copied!

Type: list of string

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

Default: [ ]

hjem.users.<name>.systemd.paths.<name>.enable Link copied!

Type: boolean

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.

Default: true

hjem.users.<name>.systemd.paths.<name>.name Link copied!

Type: string

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

hjem.users.<name>.systemd.paths.<name>.onFailure Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.paths.<name>.onSuccess Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.paths.<name>.overrideStrategy Link copied!

Type: one of "asDropinIfExists", "asDropin"

Defines how unit configuration is provided for systemd:

asDropinIfExists creates a unit file when no unit file is provided by the package otherwise it creates a drop-in file named 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 systemd.unit(5).

Default: "asDropinIfExists"

hjem.users.<name>.systemd.paths.<name>.partOf Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.paths.<name>.pathConfig Link copied!

Type: attribute set of (systemd option)

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

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

hjem.users.<name>.systemd.paths.<name>.reloadTriggers Link copied!

Type: list of (systemd option)

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.

Default: [ ]

hjem.users.<name>.systemd.paths.<name>.requiredBy Link copied!

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

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.

Default: [ ]

hjem.users.<name>.systemd.paths.<name>.requires Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.paths.<name>.requisite Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.paths.<name>.restartTriggers Link copied!

Type: list of unspecified value

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

Default: [ ]

hjem.users.<name>.systemd.paths.<name>.startLimitBurst Link copied!

Type: signed integer

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.

hjem.users.<name>.systemd.paths.<name>.startLimitIntervalSec Link copied!

Type: signed integer

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.

hjem.users.<name>.systemd.paths.<name>.unitConfig Link copied!

Type: attribute set of (systemd option)

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

Default: { }
Example:
{
  RequiresMountsFor = "/data";
}

hjem.users.<name>.systemd.paths.<name>.upheldBy Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.paths.<name>.upholds Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.paths.<name>.wantedBy Link copied!

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

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 systemd.unit(5) however is not supported because it is a stateful process that does not fit well into the NixOS design.

Default: [ ]

hjem.users.<name>.systemd.paths.<name>.wants Link copied!

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

Start the specified units when this unit is started.

Default: [ ]

hjem.users.<name>.systemd.services Link copied!

Type: attribute set of (submodule)

Definition of systemd per-user service units.

Default: { }

hjem.users.<name>.systemd.services.<name>.after Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.services.<name>.aliases Link copied!

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

Aliases of that unit.

Default: [ ]

hjem.users.<name>.systemd.services.<name>.before Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.services.<name>.bindsTo Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.services.<name>.conflicts Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.services.<name>.description Link copied!

Type: (optionally newline-terminated) single-line string

Description of this unit used in systemd messages and progress indicators.

Default: ""

hjem.users.<name>.systemd.services.<name>.documentation Link copied!

Type: list of string

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

Default: [ ]

hjem.users.<name>.systemd.services.<name>.enable Link copied!

Type: boolean

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.

Default: true

hjem.users.<name>.systemd.services.<name>.enableStrictShellChecks Link copied!

Type: boolean

Enable running shellcheck on the generated scripts for this unit.

When enabled, scripts generated by the unit will be checked with shellcheck and any errors or warnings will cause the build to fail.

This affects all scripts that have been created through the script, reload, preStart, postStart, preStop and postStop options for systemd services. This does not affect command lines passed directly to ExecStart, ExecReload, ExecStartPre, ExecStartPost, ExecStop or ExecStopPost.

Default: config.systemd.enableStrictShellChecks

hjem.users.<name>.systemd.services.<name>.environment Link copied!

Type: attribute set of (null or string or absolute path or package)

Environment variables passed to the service's processes.

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

hjem.users.<name>.systemd.services.<name>.name Link copied!

Type: string

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

hjem.users.<name>.systemd.services.<name>.notSocketActivated Link copied!

Type: boolean

If set, a changed unit is never assumed to be socket-activated on configuration switch, even if it might have associated socket units. Instead, the unit will be restarted (or stopped/started) as if it had no associated sockets.

Default: false

hjem.users.<name>.systemd.services.<name>.onFailure Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.services.<name>.onSuccess Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.services.<name>.overrideStrategy Link copied!

Type: one of "asDropinIfExists", "asDropin"

Defines how unit configuration is provided for systemd:

asDropinIfExists creates a unit file when no unit file is provided by the package otherwise it creates a drop-in file named 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 systemd.unit(5).

Default: "asDropinIfExists"

hjem.users.<name>.systemd.services.<name>.partOf Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.services.<name>.path Link copied!

Type: list of (package or string)

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

Default: [ ]

hjem.users.<name>.systemd.services.<name>.postStart Link copied!

Type: strings concatenated with "\n"

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

Default: ""

hjem.users.<name>.systemd.services.<name>.postStop Link copied!

Type: strings concatenated with "\n"

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

Default: ""

hjem.users.<name>.systemd.services.<name>.preStart Link copied!

Type: strings concatenated with "\n"

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

Default: ""

hjem.users.<name>.systemd.services.<name>.preStop Link copied!

Type: strings concatenated with "\n"

Shell commands executed to stop the service.

Default: ""

hjem.users.<name>.systemd.services.<name>.reload Link copied!

Type: strings concatenated with "\n"

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

Default: ""

hjem.users.<name>.systemd.services.<name>.reloadIfChanged Link copied!

Type: boolean

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

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

Default: false

hjem.users.<name>.systemd.services.<name>.reloadTriggers Link copied!

Type: list of (systemd option)

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.

Default: [ ]

hjem.users.<name>.systemd.services.<name>.requiredBy Link copied!

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

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.

Default: [ ]

hjem.users.<name>.systemd.services.<name>.requires Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.services.<name>.requisite Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.services.<name>.restartIfChanged Link copied!

Type: boolean

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

Default: true

hjem.users.<name>.systemd.services.<name>.restartTriggers Link copied!

Type: list of unspecified value

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

Default: [ ]

hjem.users.<name>.systemd.services.<name>.script Link copied!

Type: strings concatenated with "\n"

Shell commands executed as the service's main process.

Default: ""

hjem.users.<name>.systemd.services.<name>.scriptArgs Link copied!

Type: string

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

Default: ""
Example: "%i"

hjem.users.<name>.systemd.services.<name>.serviceConfig Link copied!

Type: attribute set of (systemd option)

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

Default: { }
Example:
{
  RestartSec = 5;
}

hjem.users.<name>.systemd.services.<name>.startAt Link copied!

Type: string or list of string

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

Default: [ ]
Example: "Sun 14:00:00"

hjem.users.<name>.systemd.services.<name>.startLimitBurst Link copied!

Type: signed integer

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.

hjem.users.<name>.systemd.services.<name>.startLimitIntervalSec Link copied!

Type: signed integer

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.

hjem.users.<name>.systemd.services.<name>.stopIfChanged Link copied!

Type: boolean

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

Default: true

hjem.users.<name>.systemd.services.<name>.unitConfig Link copied!

Type: attribute set of (systemd option)

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

Default: { }
Example:
{
  RequiresMountsFor = "/data";
}

hjem.users.<name>.systemd.services.<name>.upheldBy Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.services.<name>.upholds Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.services.<name>.wantedBy Link copied!

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

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 systemd.unit(5) however is not supported because it is a stateful process that does not fit well into the NixOS design.

Default: [ ]

hjem.users.<name>.systemd.services.<name>.wants Link copied!

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

Start the specified units when this unit is started.

Default: [ ]

hjem.users.<name>.systemd.slices Link copied!

Type: attribute set of (submodule)

Definition of systemd per-user slice units.

Default: { }

hjem.users.<name>.systemd.slices.<name>.after Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.slices.<name>.aliases Link copied!

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

Aliases of that unit.

Default: [ ]

hjem.users.<name>.systemd.slices.<name>.before Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.slices.<name>.bindsTo Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.slices.<name>.conflicts Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.slices.<name>.description Link copied!

Type: (optionally newline-terminated) single-line string

Description of this unit used in systemd messages and progress indicators.

Default: ""

hjem.users.<name>.systemd.slices.<name>.documentation Link copied!

Type: list of string

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

Default: [ ]

hjem.users.<name>.systemd.slices.<name>.enable Link copied!

Type: boolean

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.

Default: true

hjem.users.<name>.systemd.slices.<name>.name Link copied!

Type: string

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

hjem.users.<name>.systemd.slices.<name>.onFailure Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.slices.<name>.onSuccess Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.slices.<name>.overrideStrategy Link copied!

Type: one of "asDropinIfExists", "asDropin"

Defines how unit configuration is provided for systemd:

asDropinIfExists creates a unit file when no unit file is provided by the package otherwise it creates a drop-in file named 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 systemd.unit(5).

Default: "asDropinIfExists"

hjem.users.<name>.systemd.slices.<name>.partOf Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.slices.<name>.reloadTriggers Link copied!

Type: list of (systemd option)

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.

Default: [ ]

hjem.users.<name>.systemd.slices.<name>.requiredBy Link copied!

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

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.

Default: [ ]

hjem.users.<name>.systemd.slices.<name>.requires Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.slices.<name>.requisite Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.slices.<name>.restartTriggers Link copied!

Type: list of unspecified value

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

Default: [ ]

hjem.users.<name>.systemd.slices.<name>.sliceConfig Link copied!

Type: attribute set of (systemd option)

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

Default: { }
Example:
{
  MemoryMax = "2G";
}

hjem.users.<name>.systemd.slices.<name>.startLimitBurst Link copied!

Type: signed integer

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.

hjem.users.<name>.systemd.slices.<name>.startLimitIntervalSec Link copied!

Type: signed integer

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.

hjem.users.<name>.systemd.slices.<name>.unitConfig Link copied!

Type: attribute set of (systemd option)

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

Default: { }
Example:
{
  RequiresMountsFor = "/data";
}

hjem.users.<name>.systemd.slices.<name>.upheldBy Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.slices.<name>.upholds Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.slices.<name>.wantedBy Link copied!

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

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 systemd.unit(5) however is not supported because it is a stateful process that does not fit well into the NixOS design.

Default: [ ]

hjem.users.<name>.systemd.slices.<name>.wants Link copied!

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

Start the specified units when this unit is started.

Default: [ ]

hjem.users.<name>.systemd.sockets Link copied!

Type: attribute set of (submodule)

Definition of systemd per-user socket units.

Default: { }

hjem.users.<name>.systemd.sockets.<name>.after Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.sockets.<name>.aliases Link copied!

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

Aliases of that unit.

Default: [ ]

hjem.users.<name>.systemd.sockets.<name>.before Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.sockets.<name>.bindsTo Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.sockets.<name>.conflicts Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.sockets.<name>.description Link copied!

Type: (optionally newline-terminated) single-line string

Description of this unit used in systemd messages and progress indicators.

Default: ""

hjem.users.<name>.systemd.sockets.<name>.documentation Link copied!

Type: list of string

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

Default: [ ]

hjem.users.<name>.systemd.sockets.<name>.enable Link copied!

Type: boolean

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.

Default: true

hjem.users.<name>.systemd.sockets.<name>.listenDatagrams Link copied!

Type: list of string

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

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

hjem.users.<name>.systemd.sockets.<name>.listenStreams Link copied!

Type: list of string

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

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

hjem.users.<name>.systemd.sockets.<name>.name Link copied!

Type: string

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

hjem.users.<name>.systemd.sockets.<name>.onFailure Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.sockets.<name>.onSuccess Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.sockets.<name>.overrideStrategy Link copied!

Type: one of "asDropinIfExists", "asDropin"

Defines how unit configuration is provided for systemd:

asDropinIfExists creates a unit file when no unit file is provided by the package otherwise it creates a drop-in file named 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 systemd.unit(5).

Default: "asDropinIfExists"

hjem.users.<name>.systemd.sockets.<name>.partOf Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.sockets.<name>.reloadTriggers Link copied!

Type: list of (systemd option)

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.

Default: [ ]

hjem.users.<name>.systemd.sockets.<name>.requiredBy Link copied!

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

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.

Default: [ ]

hjem.users.<name>.systemd.sockets.<name>.requires Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.sockets.<name>.requisite Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.sockets.<name>.restartTriggers Link copied!

Type: list of unspecified value

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

Default: [ ]

hjem.users.<name>.systemd.sockets.<name>.socketConfig Link copied!

Type: attribute set of (systemd option)

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

Default: { }
Example:
{
  ListenStream = "/run/my-socket";
}

hjem.users.<name>.systemd.sockets.<name>.startLimitBurst Link copied!

Type: signed integer

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.

hjem.users.<name>.systemd.sockets.<name>.startLimitIntervalSec Link copied!

Type: signed integer

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.

hjem.users.<name>.systemd.sockets.<name>.unitConfig Link copied!

Type: attribute set of (systemd option)

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

Default: { }
Example:
{
  RequiresMountsFor = "/data";
}

hjem.users.<name>.systemd.sockets.<name>.upheldBy Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.sockets.<name>.upholds Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.sockets.<name>.wantedBy Link copied!

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

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 systemd.unit(5) however is not supported because it is a stateful process that does not fit well into the NixOS design.

Default: [ ]

hjem.users.<name>.systemd.sockets.<name>.wants Link copied!

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

Start the specified units when this unit is started.

Default: [ ]

hjem.users.<name>.systemd.targets Link copied!

Type: attribute set of (submodule)

Definition of systemd per-user target units.

Default: { }

hjem.users.<name>.systemd.targets.<name>.after Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.targets.<name>.aliases Link copied!

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

Aliases of that unit.

Default: [ ]

hjem.users.<name>.systemd.targets.<name>.before Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.targets.<name>.bindsTo Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.targets.<name>.conflicts Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.targets.<name>.description Link copied!

Type: (optionally newline-terminated) single-line string

Description of this unit used in systemd messages and progress indicators.

Default: ""

hjem.users.<name>.systemd.targets.<name>.documentation Link copied!

Type: list of string

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

Default: [ ]

hjem.users.<name>.systemd.targets.<name>.enable Link copied!

Type: boolean

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.

Default: true

hjem.users.<name>.systemd.targets.<name>.name Link copied!

Type: string

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

hjem.users.<name>.systemd.targets.<name>.onFailure Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.targets.<name>.onSuccess Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.targets.<name>.overrideStrategy Link copied!

Type: one of "asDropinIfExists", "asDropin"

Defines how unit configuration is provided for systemd:

asDropinIfExists creates a unit file when no unit file is provided by the package otherwise it creates a drop-in file named 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 systemd.unit(5).

Default: "asDropinIfExists"

hjem.users.<name>.systemd.targets.<name>.partOf Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.targets.<name>.reloadTriggers Link copied!

Type: list of (systemd option)

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.

Default: [ ]

hjem.users.<name>.systemd.targets.<name>.requiredBy Link copied!

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

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.

Default: [ ]

hjem.users.<name>.systemd.targets.<name>.requires Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.targets.<name>.requisite Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.targets.<name>.restartTriggers Link copied!

Type: list of unspecified value

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

Default: [ ]

hjem.users.<name>.systemd.targets.<name>.startLimitBurst Link copied!

Type: signed integer

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.

hjem.users.<name>.systemd.targets.<name>.startLimitIntervalSec Link copied!

Type: signed integer

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.

hjem.users.<name>.systemd.targets.<name>.unitConfig Link copied!

Type: attribute set of (systemd option)

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

Default: { }
Example:
{
  RequiresMountsFor = "/data";
}

hjem.users.<name>.systemd.targets.<name>.upheldBy Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.targets.<name>.upholds Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.targets.<name>.wantedBy Link copied!

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

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 systemd.unit(5) however is not supported because it is a stateful process that does not fit well into the NixOS design.

Default: [ ]

hjem.users.<name>.systemd.targets.<name>.wants Link copied!

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

Start the specified units when this unit is started.

Default: [ ]

hjem.users.<name>.systemd.timers Link copied!

Type: attribute set of (submodule)

Definition of systemd per-user timer units.

Default: { }

hjem.users.<name>.systemd.timers.<name>.after Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.timers.<name>.aliases Link copied!

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

Aliases of that unit.

Default: [ ]

hjem.users.<name>.systemd.timers.<name>.before Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.timers.<name>.bindsTo Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.timers.<name>.conflicts Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.timers.<name>.description Link copied!

Type: (optionally newline-terminated) single-line string

Description of this unit used in systemd messages and progress indicators.

Default: ""

hjem.users.<name>.systemd.timers.<name>.documentation Link copied!

Type: list of string

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

Default: [ ]

hjem.users.<name>.systemd.timers.<name>.enable Link copied!

Type: boolean

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.

Default: true

hjem.users.<name>.systemd.timers.<name>.name Link copied!

Type: string

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

hjem.users.<name>.systemd.timers.<name>.onFailure Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.timers.<name>.onSuccess Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.timers.<name>.overrideStrategy Link copied!

Type: one of "asDropinIfExists", "asDropin"

Defines how unit configuration is provided for systemd:

asDropinIfExists creates a unit file when no unit file is provided by the package otherwise it creates a drop-in file named 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 systemd.unit(5).

Default: "asDropinIfExists"

hjem.users.<name>.systemd.timers.<name>.partOf Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.timers.<name>.reloadTriggers Link copied!

Type: list of (systemd option)

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.

Default: [ ]

hjem.users.<name>.systemd.timers.<name>.requiredBy Link copied!

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

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.

Default: [ ]

hjem.users.<name>.systemd.timers.<name>.requires Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.timers.<name>.requisite Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.timers.<name>.restartTriggers Link copied!

Type: list of unspecified value

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

Default: [ ]

hjem.users.<name>.systemd.timers.<name>.startLimitBurst Link copied!

Type: signed integer

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.

hjem.users.<name>.systemd.timers.<name>.startLimitIntervalSec Link copied!

Type: signed integer

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.

hjem.users.<name>.systemd.timers.<name>.timerConfig Link copied!

Type: attribute set of (systemd option)

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

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

hjem.users.<name>.systemd.timers.<name>.unitConfig Link copied!

Type: attribute set of (systemd option)

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

Default: { }
Example:
{
  RequiresMountsFor = "/data";
}

hjem.users.<name>.systemd.timers.<name>.upheldBy Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.timers.<name>.upholds Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.timers.<name>.wantedBy Link copied!

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

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 systemd.unit(5) however is not supported because it is a stateful process that does not fit well into the NixOS design.

Default: [ ]

hjem.users.<name>.systemd.timers.<name>.wants Link copied!

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

Start the specified units when this unit is started.

Default: [ ]

hjem.users.<name>.systemd.units.<name>.aliases Link copied!

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

Aliases of that unit.

Default: [ ]

hjem.users.<name>.systemd.units.<name>.enable Link copied!

Type: boolean

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.

Default: true

hjem.users.<name>.systemd.units.<name>.name Link copied!

Type: string

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

hjem.users.<name>.systemd.units.<name>.overrideStrategy Link copied!

Type: one of "asDropinIfExists", "asDropin"

Defines how unit configuration is provided for systemd:

asDropinIfExists creates a unit file when no unit file is provided by the package otherwise it creates a drop-in file named 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 systemd.unit(5).

Default: "asDropinIfExists"

hjem.users.<name>.systemd.units.<name>.requiredBy Link copied!

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

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.

Default: [ ]

hjem.users.<name>.systemd.units.<name>.text Link copied!

Type: null or string

Text of this systemd unit.

Default: null

hjem.users.<name>.systemd.units.<name>.upheldBy Link copied!

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

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

Default: [ ]

hjem.users.<name>.systemd.units.<name>.wantedBy Link copied!

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

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 systemd.unit(5) however is not supported because it is a stateful process that does not fit well into the NixOS design.

Default: [ ]

hjem.users.<name>.user Link copied!

Type: string

The owner of a given home directory.

hjem.users.<name>.xdg.cache.directory Link copied!

Type: absolute path

The XDG cache directory for the user, to which files configured in hjem.users.<name>.xdg.cache.files will be relative to by default.

Adds XDG_CACHE_HOME to environment.sessionVariables for this user if changed.

Default: "$HOME/.cache"

hjem.users.<name>.xdg.cache.files Link copied!

Type: attribute set of (submodule)

Hjem-managed cache files.

Default: { }
Example:
{
  "foo.txt" = {
    source = "Hello World";
  };
}

hjem.users.<name>.xdg.cache.files.<name>.clobber Link copied!

Type: boolean

Whether to "clobber" existing target paths.

  • If using the systemd-tmpfiles hook (Linux only), tmpfile rules will be constructed with L+ (recreate) instead of L (create) type while this is set to true.
Default: config.hjem.users.‹name›.clobberFiles

hjem.users.<name>.xdg.cache.files.<name>.enable Link copied!

Type: boolean

Whether to enable creation of this file.

Default: true
Example: false

hjem.users.<name>.xdg.cache.files.<name>.executable Link copied!

Type: boolean

Whether to set the execute bit on the target file.

Default: false
Example: true

hjem.users.<name>.xdg.cache.files.<name>.generator Link copied!

Type: null or (function that evaluates to a(n) (null or absolute path or null or strings concatenated with "\n"))

Function that when applied to value will create the source or text of the file.

Detection is automatic, as we check if the generator generates a derivation or a string after applying to value.

Default: null
Example: lib.generators.toGitINI

hjem.users.<name>.xdg.cache.files.<name>.gid Link copied!

Type: null or string

Group ID to set as owner on the target path.

Default: null

hjem.users.<name>.xdg.cache.files.<name>.permissions Link copied!

Type: null or string

Permissions (in octal) to set on the target path.

Default: null

hjem.users.<name>.xdg.cache.files.<name>.source Link copied!

Type: null or absolute path

Path of the source file or directory.

Default: null

hjem.users.<name>.xdg.cache.files.<name>.target Link copied!

Type: string

Path to target file relative to /home/‹name›/.cache.

Default: "‹name›"

hjem.users.<name>.xdg.cache.files.<name>.text Link copied!

Type: null or strings concatenated with "\n"

Text of the file.

Default: null

hjem.users.<name>.xdg.cache.files.<name>.type Link copied!

Type: one of "symlink", "copy", "delete", "directory", "modify"

Type of path to create.

Default: "symlink"

hjem.users.<name>.xdg.cache.files.<name>.uid Link copied!

Type: null or string

User ID to set as owner on the target path.

Default: null

hjem.users.<name>.xdg.cache.files.<name>.value Link copied!

Type: null or (attribute set of anything)

Value passed to the generator.

Default: null
Example:
{
  user = {
    email = "me@example.com";
  };
}

hjem.users.<name>.xdg.config.directory Link copied!

Type: absolute path

The XDG config directory for the user, to which files configured in hjem.users.<name>.xdg.config.files will be relative to by default.

Adds XDG_CONFIG_HOME to environment.sessionVariables for this user if changed.

Default: "$HOME/.config"

hjem.users.<name>.xdg.config.files Link copied!

Type: attribute set of (submodule)

Hjem-managed config files.

Default: { }
Example:
{
  "foo.txt" = {
    source = "Hello World";
  };
}

hjem.users.<name>.xdg.config.files.<name>.clobber Link copied!

Type: boolean

Whether to "clobber" existing target paths.

  • If using the systemd-tmpfiles hook (Linux only), tmpfile rules will be constructed with L+ (recreate) instead of L (create) type while this is set to true.
Default: config.hjem.users.‹name›.clobberFiles

hjem.users.<name>.xdg.config.files.<name>.enable Link copied!

Type: boolean

Whether to enable creation of this file.

Default: true
Example: false

hjem.users.<name>.xdg.config.files.<name>.executable Link copied!

Type: boolean

Whether to set the execute bit on the target file.

Default: false
Example: true

hjem.users.<name>.xdg.config.files.<name>.generator Link copied!

Type: null or (function that evaluates to a(n) (null or absolute path or null or strings concatenated with "\n"))

Function that when applied to value will create the source or text of the file.

Detection is automatic, as we check if the generator generates a derivation or a string after applying to value.

Default: null
Example: lib.generators.toGitINI

hjem.users.<name>.xdg.config.files.<name>.gid Link copied!

Type: null or string

Group ID to set as owner on the target path.

Default: null

hjem.users.<name>.xdg.config.files.<name>.permissions Link copied!

Type: null or string

Permissions (in octal) to set on the target path.

Default: null

hjem.users.<name>.xdg.config.files.<name>.source Link copied!

Type: null or absolute path

Path of the source file or directory.

Default: null

hjem.users.<name>.xdg.config.files.<name>.target Link copied!

Type: string

Path to target file relative to /home/‹name›/.config.

Default: "‹name›"

hjem.users.<name>.xdg.config.files.<name>.text Link copied!

Type: null or strings concatenated with "\n"

Text of the file.

Default: null

hjem.users.<name>.xdg.config.files.<name>.type Link copied!

Type: one of "symlink", "copy", "delete", "directory", "modify"

Type of path to create.

Default: "symlink"

hjem.users.<name>.xdg.config.files.<name>.uid Link copied!

Type: null or string

User ID to set as owner on the target path.

Default: null

hjem.users.<name>.xdg.config.files.<name>.value Link copied!

Type: null or (attribute set of anything)

Value passed to the generator.

Default: null
Example:
{
  user = {
    email = "me@example.com";
  };
}

hjem.users.<name>.xdg.data.directory Link copied!

Type: absolute path

The XDG data directory for the user, to which files configured in hjem.users.<name>.xdg.data.files will be relative to by default.

Adds XDG_DATA_HOME to environment.sessionVariables for this user if changed.

Default: "$HOME/.local/share"

hjem.users.<name>.xdg.data.files Link copied!

Type: attribute set of (submodule)

Hjem-managed data files.

Default: { }
Example:
{
  "foo.txt" = {
    source = "Hello World";
  };
}

hjem.users.<name>.xdg.data.files.<name>.clobber Link copied!

Type: boolean

Whether to "clobber" existing target paths.

  • If using the systemd-tmpfiles hook (Linux only), tmpfile rules will be constructed with L+ (recreate) instead of L (create) type while this is set to true.
Default: config.hjem.users.‹name›.clobberFiles

hjem.users.<name>.xdg.data.files.<name>.enable Link copied!

Type: boolean

Whether to enable creation of this file.

Default: true
Example: false

hjem.users.<name>.xdg.data.files.<name>.executable Link copied!

Type: boolean

Whether to set the execute bit on the target file.

Default: false
Example: true

hjem.users.<name>.xdg.data.files.<name>.generator Link copied!

Type: null or (function that evaluates to a(n) (null or absolute path or null or strings concatenated with "\n"))

Function that when applied to value will create the source or text of the file.

Detection is automatic, as we check if the generator generates a derivation or a string after applying to value.

Default: null
Example: lib.generators.toGitINI

hjem.users.<name>.xdg.data.files.<name>.gid Link copied!

Type: null or string

Group ID to set as owner on the target path.

Default: null

hjem.users.<name>.xdg.data.files.<name>.permissions Link copied!

Type: null or string

Permissions (in octal) to set on the target path.

Default: null

hjem.users.<name>.xdg.data.files.<name>.source Link copied!

Type: null or absolute path

Path of the source file or directory.

Default: null

hjem.users.<name>.xdg.data.files.<name>.target Link copied!

Type: string

Path to target file relative to /home/‹name›/.local/share.

Default: "‹name›"

hjem.users.<name>.xdg.data.files.<name>.text Link copied!

Type: null or strings concatenated with "\n"

Text of the file.

Default: null

hjem.users.<name>.xdg.data.files.<name>.type Link copied!

Type: one of "symlink", "copy", "delete", "directory", "modify"

Type of path to create.

Default: "symlink"

hjem.users.<name>.xdg.data.files.<name>.uid Link copied!

Type: null or string

User ID to set as owner on the target path.

Default: null

hjem.users.<name>.xdg.data.files.<name>.value Link copied!

Type: null or (attribute set of anything)

Value passed to the generator.

Default: null
Example:
{
  user = {
    email = "me@example.com";
  };
}

hjem.users.<name>.xdg.state.directory Link copied!

Type: absolute path

The XDG state directory for the user, to which files configured in hjem.users.<name>.xdg.state.files will be relative to by default.

Adds XDG_STATE_HOME to environment.sessionVariables for this user if changed.

Default: "$HOME/.local/state"

hjem.users.<name>.xdg.state.files Link copied!

Type: attribute set of (submodule)

Hjem-managed state files.

Default: { }
Example:
{
  "foo.txt" = {
    source = "Hello World";
  };
}

hjem.users.<name>.xdg.state.files.<name>.clobber Link copied!

Type: boolean

Whether to "clobber" existing target paths.

  • If using the systemd-tmpfiles hook (Linux only), tmpfile rules will be constructed with L+ (recreate) instead of L (create) type while this is set to true.
Default: config.hjem.users.‹name›.clobberFiles

hjem.users.<name>.xdg.state.files.<name>.enable Link copied!

Type: boolean

Whether to enable creation of this file.

Default: true
Example: false

hjem.users.<name>.xdg.state.files.<name>.executable Link copied!

Type: boolean

Whether to set the execute bit on the target file.

Default: false
Example: true

hjem.users.<name>.xdg.state.files.<name>.generator Link copied!

Type: null or (function that evaluates to a(n) (null or absolute path or null or strings concatenated with "\n"))

Function that when applied to value will create the source or text of the file.

Detection is automatic, as we check if the generator generates a derivation or a string after applying to value.

Default: null
Example: lib.generators.toGitINI

hjem.users.<name>.xdg.state.files.<name>.gid Link copied!

Type: null or string

Group ID to set as owner on the target path.

Default: null

hjem.users.<name>.xdg.state.files.<name>.permissions Link copied!

Type: null or string

Permissions (in octal) to set on the target path.

Default: null

hjem.users.<name>.xdg.state.files.<name>.source Link copied!

Type: null or absolute path

Path of the source file or directory.

Default: null

hjem.users.<name>.xdg.state.files.<name>.target Link copied!

Type: string

Path to target file relative to /home/‹name›/.local/state.

Default: "‹name›"

hjem.users.<name>.xdg.state.files.<name>.text Link copied!

Type: null or strings concatenated with "\n"

Text of the file.

Default: null

hjem.users.<name>.xdg.state.files.<name>.type Link copied!

Type: one of "symlink", "copy", "delete", "directory", "modify"

Type of path to create.

Default: "symlink"

hjem.users.<name>.xdg.state.files.<name>.uid Link copied!

Type: null or string

User ID to set as owner on the target path.

Default: null

hjem.users.<name>.xdg.state.files.<name>.value Link copied!

Type: null or (attribute set of anything)

Value passed to the generator.

Default: null
Example:
{
  user = {
    email = "me@example.com";
  };
}