Module options
If you’re using wrapper-manager as part of either home-manager or NixOS environment, you can enable offline documentation with |
_module.args
Additional arguments passed to each module in addition to ones like lib
, config
, and pkgs
, modulesPath
.
This option is also available to all submodules. Submodules do not inherit args from their parent module, nor do they provide args to their parent module or sibling submodules. The sole exception to this is the argument name
which is provided by parent modules to a submodule and contains the attribute name the submodule is bound to, or a unique generated name if it is not bound to an attribute.
Some arguments are already passed by default, of which the following cannot be changed with this option:
-
lib
: The nixpkgs library. -
config
: The results of all options after merging the values from all modules together. -
options
: The options declared in all modules. -
specialArgs
: ThespecialArgs
argument passed toevalModules
. -
All attributes of
specialArgs
Whereas option values can generally depend on other option values thanks to laziness, this does not apply to
imports
, which must be computed statically before anything else.For this reason, callers of the module system can provide
specialArgs
which are available during import resolution.For NixOS,
specialArgs
includesmodulesPath
, which allows you to import extra modules from the nixpkgs package tree without having to somehow make the module aware of the location of thenixpkgs
or NixOS directories.{ modulesPath, ... }: { imports = [ (modulesPath + "/profiles/minimal.nix") ]; }
For NixOS, the default value for this option includes at least this argument:
-
pkgs
: The nixpkgs package set according to thenixpkgs.pkgs
option.
Type: lazy attribute set of raw value
Declared by:
basePackages
Packages to be included in the wrapper package. However, there are differences in behavior when given certain values.
-
When the value is a bare package, the build process will use
$PACKAGE.overrideAttrs
to create the package. This makes it suitable to be used as part ofprograms.<name>.package
typically found on other environments (e.g., NixOS). Take note this means a rebuild of the package. -
When the value is a list of packages, the build process will use
symlinkJoin
as the builder to create the derivation.
Type: package or list of package
Default: [ ]
Example:
with pkgs; [ yt-dlp ]
Declared by:
build.drvName
The name of the final derivation output.
Type: non-empty string
Default:
'' if `config.basePackages` is a list then `"wrapper-manager-fds-wrapped-package"` else `"$PACKAGE_PNAME-$PACKAGE_VERSION-wm-wrapped"` ''
Example: "my-custom-package-name"
Declared by:
build.extraMeta
Additional attributes to be passed as part of meta
in the resulting derivation.
Type: attribute set of anything
Default: { }
Example:
{ mainProgram = config.wrappers.hello.executableName; }
Declared by:
build.extraPassthru
Set of data to be passed through passthru
of the resulting derivation.
Type: attribute set of anything
Default: { }
Declared by:
build.extraSetup
Additional script for setting up the wrapper script derivation.
Type: strings concatenated with “\n”
Default: ""
Declared by:
build.variant
Indicates the type of wrapper to be made. By default, wrapper-manager sets this to binary
.
Type: one of “binary”, “shell”
Default: "binary"
Example: "shell"
Declared by:
dataFormats.enableCommonFormats
Whether to initialize dataFormats.formats
with common formats.
For future references, the formats exported are JSON, YAML, TOML, and INI. With the following code being equivalent to the module effect:
{
json = pkgs.formats.json { };
yaml = pkgs.formats.yaml { };
toml = pkgs.formats.toml { };
ini = pkgs.formats.ini { };
}
Type: boolean
Default: true
Example: false
Declared by:
dataFormats.files
A set of data files to be exported to the package.
Type: attribute set of (submodule)
Default: { }
Example:
{ "share/lazygit/config.yml" = { variant = "yaml"; content = lib.mkMerge [ { gui = { expandFocusedSidePanel = true; showBottomLine = false; skipRewordInEditorWarning = true; theme = { selectedLineBgColor = [ "reverse" ]; selectedRangeBgColor = [ "reverse" ]; }; }; notARepository = "skip"; } { gui.expandFocusedSidePanel = lib.mkForce false; } ]; }; "/etc/hello/config.json" = { variant = "json"; content = { locale = "FR"; defaultName = "Gretchen"; defaultFormat = "long"; }; }; }
Declared by:
dataFormats.files.<name>.content
The data content structure in accordance to the variant’s type.
Type: given from {option}`dataFormats.formats.<variant>.type`
Example:
{ num_of_boundaries = 67; battle.skills = [ "Bushido Flow" "Shy Supernova" "Mach 13 Elephant Explosion" "Steel Python" "Cashmere Cannonball" ]; }
Declared by:
dataFormats.files.<name>.mode
Permissions to be given to the file. By default, it is given with a symlink.
Type: string matching the pattern [0-7]{3,4}
Default: "0444"
Example: "0600"
Declared by:
dataFormats.files.<name>.target
Path relative to the derivation output path.
Type: string
Default: "‹name›"
Example: /etc/xdg/app/config.json
Declared by:
dataFormats.files.<name>.variant
Indicates what data format to generate for the data file from dataFormats.formats
.
Type: non-empty string
Default: "json"
Example: "yaml"
Declared by:
dataFormats.formats
A set of Nix-representable formats to generate the files configured from dataFormats.files.<name>.content
.
Type: attribute set of (attribute set of anything)
Default: { }
Example:
{ json = pkgs.formats.json { }; ini = pkgs.formats.ini { }; }
Declared by:
dataFormats.formats.<name>.generate
The generator function for the Nix-representable format.
Type: function that evaluates to a(n) function that evaluates to a(n) package
Declared by:
dataFormats.formats.<name>.type
The module option type for the value of the Nix-representable format.
Type: optionType
Declared by:
environment.pathAdd
A global list of paths to be added per-wrapper as part of the PATH
environment variable.
Type: list of absolute path
Default: [ ]
Example:
wrapperManagerLib.getBin (with pkgs; [ yt-dlp gallery-dl ])
Declared by:
environment.variables
A global set of environment variables and their actions to be applied per-wrapper.
Type: attribute set of (submodule)
Default: { }
Example:
{ "FOO_TYPE".value = "custom"; "FOO_LOG_STYLE" = { action = "set-default"; value = "systemd"; }; "USELESS_VAR".action = "unset"; }
Declared by:
environment.variables.<name>.action
Sets the appropriate action for the environment variable.
-
unset
… unsets the given variable. -
set-default
only sets the variable with the given value if not already set. -
set
forcibly sets the variable with given value. -
prefix
andsuffix
prepends and appends the environment variable containing a given separator-delimited list of values respectively. It requires thevalue
to be a list of string and aseparator
value.
Type: one of “unset”, “set”, “set-default”, “prefix”, “suffix”
Default: "set"
Example: "unset"
Declared by:
environment.variables.<name>.separator
Separator used to create a character-delimited list of the environment variable holding a list of values.
Only used for |
Type: string
Default: ":"
Example: ";"
Declared by:
environment.variables.<name>.value
The value of the variable that is holding.
It accepts a list of values only for |
Type: (string and select types (numbers, boolean, and path) convertible to it) or list of (string and select types (numbers, boolean, and path) convertible to it)
Example: "HELLO THERE"
Declared by:
files
Extra set of files to be exported within the derivation.
Be careful when placing executables in |
Type: attribute set of (submodule)
Default: { }
Example:
{ "share/example-app/docs".source = ./docs; "etc/xdg".source = ./config; "share/example-app/example-config".text = ''' hello=world location=INSIDE OF YOUR WALLS '''; }
Declared by:
files.<name>.mode
Permissions to be given to the file. By default, it is given with a symlink.
Type: string matching the pattern [0-7]{0,4}
Default: "0644"
Example: "0600"
Declared by:
files.<name>.target
Path of the file relative to the derivation output path.
Type: non-empty string
Default: "‹name›"
Example: "share/applications/org.example.App1.desktop"
Declared by:
files.<name>.text
Text content of the given filesystem path.
Type: null or strings concatenated with “\n”
Default: null
Example:
'' key=value hello=world ''
Declared by:
locale.enable
Whether to enable explicit glibc locale support. This is recommended for Nix-built applications.
Type: boolean
Default: true
Example: false
Declared by:
locale.package
The package containing glibc locales.
Type: package
Default: <derivation glibc-locales-2.40-66>
Declared by:
programs.gnome-session.package
The gnome-session package to use.
Type: package
Default: pkgs.gnome-session
Declared by:
programs.gnome-session.sessions
A set of desktop sessions to be configured with gnome-session(1)
. It generates all of the appropriate files for a desktop session including a Wayland session .desktop
file, the desktop entries of the session’s components, and a set of systemd units.
In practice, you can only use either systemd or its custom system at any given point. |
Each of the attribute name is used as the identifier of the desktop environment.
While you can make identifiers in any way, it is encouraged to stick to a naming scheme. The recommended method is a reverse DNS-like scheme preferably with a domain name you own (e.g., |
Type: attribute set of (submodule)
Default: { }
Example:
{ "gnome-minimal" = let sessionCfg = config.programs.gnome-session.sessions."gnome-minimal"; in { fullName = "GNOME (minimal)"; description = "Minimal GNOME session"; display = [ "wayland" "xorg" ]; extraArgs = [ "--systemd" ]; requiredComponents = let gsdComponents = lib.map (gsdc: "org.gnome.SettingsDaemon.${gsdc}") [ "A11ySettings" "Color" "Housekeeping" "Power" "Keyboard" "Sound" "Wacom" "XSettings" ]; in gsdComponents ++ [ "org.gnome.Shell" ]; systemd.targetUnit = { requires = [ "org.gnome.Shell.target" ]; wants = lib.map (c: "${c}.target") (lib.lists.remove "org.gnome.Shell" sessionCfg.requiredComponents); }; }; "one.foodogsquared.SimpleWay" = { fullName = "Simple Way"; description = "A desktop environment featuring Sway window manager."; display = [ "wayland" ]; extraArgs = [ "--systemd" ]; components = { # This unit is intended to start with gnome-session. window-manager = { script = '' ${lib.getExe' config.programs.sway.package "sway"} --config ${./config/sway/config} ''; description = "An i3 clone for Wayland."; systemd.serviceUnit = { serviceConfig = { Type = "notify"; NotifyAccess = "all"; OOMScoreAdjust = -1000; }; unitConfig = { OnFailure = [ "gnome-session-shutdown.target" ]; OnFailureJobMode = "replace-irreversibly"; }; }; systemd.targetUnit = { requisite = [ "gnome-session-initialized.target" ]; partOf = [ "gnome-session-initialized.target" ]; before = [ "gnome-session-initialized.target" ]; }; }; desktop-widgets = { script = '' ${lib.getExe' pkgs.ags "ags"} --config ${./config/ags/config.js} ''; description = "A desktop widget system using layer-shell protocol."; systemd.serviceUnit = { serviceConfig = { OOMScoreAdjust = -1000; }; path = with pkgs; [ ags ]; startLimitBurst = 5; startLimitIntervalSec = 15; }; systemd.targetUnit = { requisite = [ "gnome-session-initialized.target" ]; partOf = [ "gnome-session-initialized.target" ]; before = [ "gnome-session-initialized.target" ]; }; }; auth-agent = { script = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; description = "Authentication agent"; systemd.serviceUnit = { startLimitBurst = 5; startLimitIntervalSec = 15; }; systemd.targetUnit = { partOf = [ "gnome-session.target" "graphical-session.target" ]; requisite = [ "gnome-session.target" ]; after = [ "gnome-session.target" ]; }; }; }; }; }
Declared by:
programs.gnome-session.sessions.<name>.components
The individual components to be launched with the desktop session.
Type: attribute set of (submodule)
Default: { }
Example:
{ window-manager = { script = '' ${lib.getExe' config.programs.sway.package "sway"} ''; description = "An i3 clone for Wayland."; }; desktop-widgets.script = '' ${lib.getExe' pkgs.ags "ags"} --config ${./config.js} ''; }
Declared by:
programs.gnome-session.sessions.<name>.components.<name>.description
One-sentence description of the component.
Type: non-empty string
Default: "‹name›"
Example: "Desktop widgets"
Declared by:
programs.gnome-session.sessions.<name>.components.<name>.desktopEntrySettings
The configuration for the gnome-session desktop file. For more information, look into makeDesktopItem
nixpkgs builder.
You should configure this is if you use the built-in service management to be able to customize the session.
This module appends several options for the desktop item builder such as the script path and |
Type: attribute set of anything
Default: { }
Example:
{ extraConfig = { X-GNOME-AutoRestart = "true"; X-GNOME-Autostart-Phase = "WindowManager"; }; }
Declared by:
programs.gnome-session.sessions.<name>.components.<name>.id
The identifier of the component used in generating filenames for its .desktop
files and as part of systemd unit names.
Type: string (read only)
Default: "$SESSION_NAME.$COMPONENT_NAME"
Declared by:
programs.gnome-session.sessions.<name>.components.<name>.script
Shell script fragment of the component.
The way it is handled is different per startup methods.
-
This will be wrapped in a script for proper integration with the legacy non-systemd session management.
-
For systemd-managed sessions, it will be part of
programs.gnome-session.sessions.<sessions>.components.<name>.serviceUnit.script
.
Type: strings concatenated with “\n”
Declared by:
programs.gnome-session.sessions.<name>.components.<name>.systemd.pathUnit
An optional systemd path configuration to be generated. This should be configured if the session is managed by systemd.
This has the same options as |
Type: null or (submodule)
Default: null
Declared by:
programs.gnome-session.sessions.<name>.components.<name>.systemd.serviceUnit
systemd service configuration to be generated. This should be configured if the session is managed by systemd.
This has the same options as By default, this module sets the service unit as part of the respective target unit (i.e., On a typical case, you shouldn’t mess with much of the dependency ordering of the service unit. You should configure |
Type: submodule
Default: { }
Declared by:
programs.gnome-session.sessions.<name>.components.<name>.systemd.socketUnit
An optional systemd socket configuration to be generated. This should be configured if the session is managed by systemd.
This has the same options as |
Type: null or (submodule)
Default: null
Declared by:
programs.gnome-session.sessions.<name>.components.<name>.systemd.targetUnit
systemd target configuration to be generated. This should be configured if the session is managed by systemd.
This has the same options as This module doesn’t set the typical dependency ordering relative to gnome-session targets. This is on the user to manually set them. |
Type: submodule
Default: { }
Declared by:
programs.gnome-session.sessions.<name>.components.<name>.systemd.timerUnit
An optional systemd timer configuration to be generated. This should be configured if the session is managed by systemd.
This has the same options as |
Type: null or (submodule)
Default: null
Declared by:
programs.gnome-session.sessions.<name>.description
A one-sentence description of the desktop environment.
Type: non-empty string
Default: ${<name>.fullName} desktop environment
Example: "A desktop environment featuring a scrolling compositor."
Declared by:
programs.gnome-session.sessions.<name>.desktopNames
Names to be used as DesktopNames=
entry of the session .desktop
file. Useful if you’re creating a customized version of an already existing desktop session.
This module sanitizes the values by prepending the given names with |
Type: list of non-empty string
Default: "[ <session>.fullName ]"
Example:
[ "GNOME" "Garden" ]
Declared by:
programs.gnome-session.sessions.<name>.extraArgs
A list of arguments from gnome-session
to be added for the session script.
An argument |
Type: list of string
Example:
[ "--systemd" "--disable-acceleration-check" ]
Declared by:
programs.gnome-session.sessions.<name>.fullName
The display name of the desktop environment.
Type: non-empty string
Default: "‹name›"
Example: "Mosey Branch"
Declared by:
programs.gnome-session.sessions.<name>.requiredComponents
A list of desktop components as part of RequiredComponents=
for the gnome-session configuration.
For the most part, this shouldn’t require manually configuring it if you set The only time you manually set this if you want to require other gnome-session components from other desktop such as when creating a customized version of GNOME. |
Type: list of string
Default: [ ]
Example:
[ "org.gnome.Shell" "org.gnome.SettingsDaemon.A11ySettings" "org.gnome.SettingsDaemon.Power" "org.gnome.SettingsDaemon.Wacom" ]
Declared by:
programs.gnome-session.sessions.<name>.settings
Settings to be included to the gnome-session keyfile of the session.
Generally, you won’t need to set this since the module will set the common settings such as the RequiredComponents=
key.
Type: attribute set of attribute set of (GLib keyfile atom (bool, int, float, string, or a list of the previous atoms))
Default: { }
Example:
{ "GNOME Session" = { # A helper script to check if the session is runnable. IsRunnableHelper = "${lib.getExe' pkgs.niri "niri"} --validate config"; # A fallback session in case it failed. FallbackSession = "gnome"; }; }
Declared by:
programs.gnome-session.sessions.<name>.systemd.targetUnit
systemd target configuration to be generated for gnome-session@<name>.target
. This should be configured if the session is managed by systemd and you want to control the session further (which is recommended since this module don’t know what components are more important, etc.).
By default, the session target will have all of its components from <session>.requiredComponents
under Wants=
directive. It also assumes all of them have a target unit at ${requiredComponent}.target
.
This has the same options as |
Type: submodule
Default:
'' { wants = ... # All of the required components as a target unit. } ''
Declared by:
programs.systemd.enableCommonDependencies
Whether to install additional dependencies on the generated scripts of systemd services.
These dependencies are simply additional GNU utilities such as coreutils
, findutils
, grep
, and sed
.
Type: boolean
Default: false
Example: true
Declared by:
programs.systemd.enableCommonPathFromEnvironment
Whether to enable include paths from environment.pathAdd
.
Type: boolean
Default: false
Example: true
Declared by:
programs.systemd.enableInheritEnvironmentVariables
Whether to enable include environment variables from environment.variables
.
Type: boolean
Default: false
Example: true
Declared by:
programs.systemd.enableStatelessInstallation
Whether to enable stateless installation of the systemd units into their proper place. This involves the generated units within the derivation to be placed within additional folder structure.
So far, this is only based from several install unit options (e.g., requiredBy
, wantedBy
, upheldBy
, and aliases
).
Type: boolean
Default: false
Example: true
Declared by:
programs.systemd.enableStrictShellChecks
Whether to run shellcheck
on all of the generated scripts defined in systemd.
Type: boolean
Default: true
Example: false
Declared by:
programs.systemd.environment
Environment variables passed to all systemd service and socket units.
Type: attribute set of (null or string or absolute path or package)
Default: { }
Example:
{ TZ = "CET"; }
Declared by:
programs.systemd.system.automounts
Set of systemd automount units to be placed in $out/etc/systemd/system/$UNITNAME
as described from systemd.automount(5).
Type: attribute set of (submodule)
Default: { }
Declared by:
programs.systemd.system.automounts.<name>.enableStatelessInstallation
Whether to enable stateless setup of the systemd units in the derivation.
Type: boolean
Default: false
Example: true
Declared by:
programs.systemd.system.automounts.<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:
programs.systemd.system.automounts.<name>.aliases
Aliases of that unit to be put under Install.Alias=
directive.
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:
programs.systemd.system.automounts.<name>.automountConfig
Each attribute in this set specifies an option in the [Automount]
section of the unit. See systemd.automount(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ DirectoryMode = "0775"; }
Declared by:
programs.systemd.system.automounts.<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:
programs.systemd.system.automounts.<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:
programs.systemd.system.automounts.<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:
programs.systemd.system.automounts.<name>.description
Description of this unit used in systemd messages and progress indicators.
Type: (optionally newline-terminated) single-line string
Default: ""
Declared by:
programs.systemd.system.automounts.<name>.documentation
A list of URIs referencing documentation for this unit or its configuration.
Type: list of string
Default: [ ]
Declared by:
programs.systemd.system.automounts.<name>.extraSectionsConfig
Additional sections with their configuration to be included. Each of attribute’s section name is prepended with X-
in the unit file.
Any sections prepended with |
Type: attribute set of attribute set of (systemd option)
Default: { }
Example:
{ "Custom Section" = { Hello = "there"; AnotherCustomConfigSettings = builtins.toString [ "SPACE" "DELIMITED" "VALUES" ]; }; "org.example.App" = { additional_search_path = lib.makeBinPath [ "/root" "/usr" "/usr/local" ]; }; }
Declared by:
programs.systemd.system.automounts.<name>.filename
The filename of the systemd unit. This should be preferred to refer to the file path in the resulting output path where it can generate systemd drop-in units.
Type: string
Declared by:
programs.systemd.system.automounts.<name>.installConfig
Settings under [Install]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ WantedBy = [ "default.target" ]; }
Declared by:
programs.systemd.system.automounts.<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:
programs.systemd.system.automounts.<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:
programs.systemd.system.automounts.<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:
programs.systemd.system.automounts.<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:
programs.systemd.system.automounts.<name>.requiredBy
Units that require (i.e. depend on and need to go down with) this 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:
programs.systemd.system.automounts.<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:
programs.systemd.system.automounts.<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:
programs.systemd.system.automounts.<name>.settings
The settings for the systemd unit.
This could be used to completely override settings associated with the rest of the unit module such as Just use this only as a last resort if your target systemd version does not match with the module’s target version AND there’s no plausible way to set the unit directive you want. |
Type: attribute set of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string) or list of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string)))
Default: { }
Declared by:
programs.systemd.system.automounts.<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:
programs.systemd.system.automounts.<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:
programs.systemd.system.automounts.<name>.unitConfig
Settings under [Unit]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ RequiresMountsFor = "/data"; }
Declared by:
programs.systemd.system.automounts.<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:
programs.systemd.system.automounts.<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:
programs.systemd.system.automounts.<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 (programs.systemd.user.<name>.*
) set it to ["default.target"]
to make a unit start by default when the user <name>
logs on.
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:
programs.systemd.system.automounts.<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:
programs.systemd.system.automounts.<name>.where
Absolute path of a directory of the mount point. Will be created if it doesn’t exist. (Mandatory)
Type: string
Example: "/mnt"
Declared by:
programs.systemd.system.mounts
Set of systemd mount units to be placed in $out/etc/systemd/system/$UNITNAME
as described from systemd.mount(5).
Type: attribute set of (submodule)
Default: { }
Declared by:
programs.systemd.system.mounts.<name>.enableStatelessInstallation
Whether to enable stateless setup of the systemd units in the derivation.
Type: boolean
Default: false
Example: true
Declared by:
programs.systemd.system.mounts.<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:
programs.systemd.system.mounts.<name>.aliases
Aliases of that unit to be put under Install.Alias=
directive.
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:
programs.systemd.system.mounts.<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:
programs.systemd.system.mounts.<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:
programs.systemd.system.mounts.<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:
programs.systemd.system.mounts.<name>.description
Description of this unit used in systemd messages and progress indicators.
Type: (optionally newline-terminated) single-line string
Default: ""
Declared by:
programs.systemd.system.mounts.<name>.documentation
A list of URIs referencing documentation for this unit or its configuration.
Type: list of string
Default: [ ]
Declared by:
programs.systemd.system.mounts.<name>.extraSectionsConfig
Additional sections with their configuration to be included. Each of attribute’s section name is prepended with X-
in the unit file.
Any sections prepended with |
Type: attribute set of attribute set of (systemd option)
Default: { }
Example:
{ "Custom Section" = { Hello = "there"; AnotherCustomConfigSettings = builtins.toString [ "SPACE" "DELIMITED" "VALUES" ]; }; "org.example.App" = { additional_search_path = lib.makeBinPath [ "/root" "/usr" "/usr/local" ]; }; }
Declared by:
programs.systemd.system.mounts.<name>.filename
The filename of the systemd unit. This should be preferred to refer to the file path in the resulting output path where it can generate systemd drop-in units.
Type: string
Declared by:
programs.systemd.system.mounts.<name>.installConfig
Settings under [Install]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ WantedBy = [ "default.target" ]; }
Declared by:
programs.systemd.system.mounts.<name>.mountConfig
Each attribute in this set specifies an option in the [Mount]
section of the unit. See systemd.mount(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ DirectoryMode = "0775"; }
Declared by:
programs.systemd.system.mounts.<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:
programs.systemd.system.mounts.<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:
programs.systemd.system.mounts.<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:
programs.systemd.system.mounts.<name>.options
Options used to mount the file system.
Type: strings concatenated with “,”
Default: ""
Example: "noatime"
Declared by:
programs.systemd.system.mounts.<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:
programs.systemd.system.mounts.<name>.requiredBy
Units that require (i.e. depend on and need to go down with) this 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:
programs.systemd.system.mounts.<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:
programs.systemd.system.mounts.<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:
programs.systemd.system.mounts.<name>.settings
The settings for the systemd unit.
This could be used to completely override settings associated with the rest of the unit module such as Just use this only as a last resort if your target systemd version does not match with the module’s target version AND there’s no plausible way to set the unit directive you want. |
Type: attribute set of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string) or list of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string)))
Default: { }
Declared by:
programs.systemd.system.mounts.<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:
programs.systemd.system.mounts.<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:
programs.systemd.system.mounts.<name>.type
File system type.
Type: string
Default: ""
Example: "ext4"
Declared by:
programs.systemd.system.mounts.<name>.unitConfig
Settings under [Unit]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ RequiresMountsFor = "/data"; }
Declared by:
programs.systemd.system.mounts.<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:
programs.systemd.system.mounts.<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:
programs.systemd.system.mounts.<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 (programs.systemd.user.<name>.*
) set it to ["default.target"]
to make a unit start by default when the user <name>
logs on.
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:
programs.systemd.system.mounts.<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:
programs.systemd.system.mounts.<name>.what
Absolute path of device node, file or other resource. (Mandatory)
Type: string
Example: "/dev/sda1"
Declared by:
programs.systemd.system.mounts.<name>.where
Absolute path of a directory of the mount point. Will be created if it doesn’t exist. (Mandatory)
Type: string
Example: "/mnt"
Declared by:
programs.systemd.system.paths
Set of systemd path units to be placed in $out/etc/systemd/system/$UNITNAME
as described from systemd.path(5).
Type: attribute set of (submodule)
Default: { }
Declared by:
programs.systemd.system.paths.<name>.enableStatelessInstallation
Whether to enable stateless setup of the systemd units in the derivation.
Type: boolean
Default: false
Example: true
Declared by:
programs.systemd.system.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:
programs.systemd.system.paths.<name>.aliases
Aliases of that unit to be put under Install.Alias=
directive.
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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.paths.<name>.description
Description of this unit used in systemd messages and progress indicators.
Type: (optionally newline-terminated) single-line string
Default: ""
Declared by:
programs.systemd.system.paths.<name>.documentation
A list of URIs referencing documentation for this unit or its configuration.
Type: list of string
Default: [ ]
Declared by:
programs.systemd.system.paths.<name>.extraSectionsConfig
Additional sections with their configuration to be included. Each of attribute’s section name is prepended with X-
in the unit file.
Any sections prepended with |
Type: attribute set of attribute set of (systemd option)
Default: { }
Example:
{ "Custom Section" = { Hello = "there"; AnotherCustomConfigSettings = builtins.toString [ "SPACE" "DELIMITED" "VALUES" ]; }; "org.example.App" = { additional_search_path = lib.makeBinPath [ "/root" "/usr" "/usr/local" ]; }; }
Declared by:
programs.systemd.system.paths.<name>.filename
The filename of the systemd unit. This should be preferred to refer to the file path in the resulting output path where it can generate systemd drop-in units.
Type: string
Declared by:
programs.systemd.system.paths.<name>.installConfig
Settings under [Install]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ WantedBy = [ "default.target" ]; }
Declared by:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.paths.<name>.pathConfig
Each attribute in this set specifies an option in the [Path]
section of the unit. See systemd.path(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ PathChanged = "/some/path"; Unit = "changedpath.service"; }
Declared by:
programs.systemd.system.paths.<name>.requiredBy
Units that require (i.e. depend on and need to go down with) this 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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.paths.<name>.settings
The settings for the systemd unit.
This could be used to completely override settings associated with the rest of the unit module such as Just use this only as a last resort if your target systemd version does not match with the module’s target version AND there’s no plausible way to set the unit directive you want. |
Type: attribute set of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string) or list of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string)))
Default: { }
Declared by:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.paths.<name>.unitConfig
Settings under [Unit]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ RequiresMountsFor = "/data"; }
Declared by:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.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 (programs.systemd.user.<name>.*
) set it to ["default.target"]
to make a unit start by default when the user <name>
logs on.
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:
programs.systemd.system.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:
programs.systemd.system.services
Set of systemd service units to be placed in $out/etc/systemd/system/$UNITNAME
as described from systemd.service(5).
Type: attribute set of (submodule)
Default: { }
Example:
{ hello = { description = "wrapper-manager systemd service example"; path = with pkgs; [ hello ]; script = "hello"; startAt = "weekly"; }; nix-daemon = { description = "Fake Nix daemon build"; documentation = [ "man:nix-daemon" "https://nixos.org/manual" ]; unitConfig = { RequireMountsFor = [ "/nix/store" "/nix/var" "/nix/var/nix/db" ]; }; serviceConfig = { ExecStart = "@${lib.getExe' pkgs.nix "nix-daemon"} nix-daemon --daemon"; KillMode = "process"; LimitNOFILE = 1048576; TasksMax = 1048576; Delegate = "yes"; }; wantedBy = [ "multi-user.target" ]; }; }
Declared by:
programs.systemd.system.services.<name>.enableCommonDependencies
Whether to install additional dependencies on the generated scripts of systemd services.
These dependencies are simply additional GNU utilities such as coreutils
, findutils
, grep
, and sed
.
Type: boolean
Default: false
Example: true
Declared by:
programs.systemd.system.services.<name>.enableStatelessInstallation
Whether to enable stateless setup of the systemd units in the derivation.
Type: boolean
Default: false
Example: true
Declared by:
programs.systemd.system.services.<name>.enableStrictShellChecks
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 service and socket units. This does not affect command lines passed directly to ExecStart
, ExecReload
, ExecStartPre
, ExecStartPost
, ExecStop
or ExecStopPost
.
Type: boolean
Default: true
Declared by:
programs.systemd.system.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:
programs.systemd.system.services.<name>.aliases
Aliases of that unit to be put under Install.Alias=
directive.
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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.services.<name>.description
Description of this unit used in systemd messages and progress indicators.
Type: (optionally newline-terminated) single-line string
Default: ""
Declared by:
programs.systemd.system.services.<name>.documentation
A list of URIs referencing documentation for this unit or its configuration.
Type: list of string
Default: [ ]
Declared by:
programs.systemd.system.services.<name>.environment
Environment variables passed to the unit’s execution environment.
Type: attribute set of (null or string or absolute path or package)
Default: { }
Example:
{ LANG = "nl_NL.UTF-8"; PATH = "/foo/bar/bin"; }
Declared by:
programs.systemd.system.services.<name>.extraSectionsConfig
Additional sections with their configuration to be included. Each of attribute’s section name is prepended with X-
in the unit file.
Any sections prepended with |
Type: attribute set of attribute set of (systemd option)
Default: { }
Example:
{ "Custom Section" = { Hello = "there"; AnotherCustomConfigSettings = builtins.toString [ "SPACE" "DELIMITED" "VALUES" ]; }; "org.example.App" = { additional_search_path = lib.makeBinPath [ "/root" "/usr" "/usr/local" ]; }; }
Declared by:
programs.systemd.system.services.<name>.filename
The filename of the systemd unit. This should be preferred to refer to the file path in the resulting output path where it can generate systemd drop-in units.
Type: string
Declared by:
programs.systemd.system.services.<name>.installConfig
Settings under [Install]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ WantedBy = [ "default.target" ]; }
Declared by:
programs.systemd.system.services.<name>.listenOn
List of addresses to listen on. Each of the items will be included as part of Socket.ListenStream=
directive of the corresponding socket unit. See systemd.socket(5) for more details.
Type: list of string
Default: [ ]
Example:
[ "0.0.0.0:993" "/run/my-socket" ]
Declared by:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.services.<name>.path
Packages added to the service’s PATH
environment variable. Both the bin
and sbin
subdirectories of each package are added.
Type: list of (package or string)
Default: [ ]
Declared by:
programs.systemd.system.services.<name>.postStart
Shell commands executed after the execution environment’s main process is started.
Type: strings concatenated with “\n”
Default: ""
Declared by:
programs.systemd.system.services.<name>.postStop
Shell commands executed after the service’s main process has exited.
Type: strings concatenated with “\n”
Default: ""
Declared by:
programs.systemd.system.services.<name>.preStart
Shell commands executed before the execution environment’s main process is started.
Type: strings concatenated with “\n”
Default: ""
Declared by:
programs.systemd.system.services.<name>.preStop
Shell commands executed to stop the execution environment’s .
Type: strings concatenated with “\n”
Default: ""
Declared by:
programs.systemd.system.services.<name>.reload
Shell commands executed when the service’s main process is reloaded.
Type: strings concatenated with “\n”
Default: ""
Declared by:
programs.systemd.system.services.<name>.requiredBy
Units that require (i.e. depend on and need to go down with) this 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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.services.<name>.script
Shell commands executed as the service’s main process.
Type: strings concatenated with “\n”
Default: ""
Declared by:
programs.systemd.system.services.<name>.scriptArgs
Arguments passed to the main process script. Can contain specifiers (%
placeholders expanded by systemd, see systemd.unit(5)).
Type: string
Default: ""
Example: "%i"
Declared by:
programs.systemd.system.services.<name>.serviceConfig
Each attribute in this set specifies an option in the [Service]
section of the unit. See systemd.service(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ RestartSec = 5; }
Declared by:
programs.systemd.system.services.<name>.settings
The settings for the systemd unit.
This could be used to completely override settings associated with the rest of the unit module such as Just use this only as a last resort if your target systemd version does not match with the module’s target version AND there’s no plausible way to set the unit directive you want. |
Type: attribute set of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string) or list of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string)))
Default: { }
Declared by:
programs.systemd.system.services.<name>.startAt
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.
Type: string or list of string
Default: [ ]
Example: "Sun 14:00:00"
Declared by:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.services.<name>.unitConfig
Settings under [Unit]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ RequiresMountsFor = "/data"; }
Declared by:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.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 (programs.systemd.user.<name>.*
) set it to ["default.target"]
to make a unit start by default when the user <name>
logs on.
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:
programs.systemd.system.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:
programs.systemd.system.services.<name>.watchFilesFrom
List of file globs to monitor changes to the files. Each of the items will be included as part of the Path.Modified=
directive as well as automatically create those directories with Path.MakeDirectory=
set to true of the corresponding path unit. See systemd.path(5) for more details.
Type: list of string
Default: [ ]
Example: [ ]
Declared by:
programs.systemd.system.slices
Set of systemd slice units to be placed in $out/etc/systemd/system/$UNITNAME
as described from systemd.slice(5).
Type: attribute set of (submodule)
Default: { }
Declared by:
programs.systemd.system.slices.<name>.enableStatelessInstallation
Whether to enable stateless setup of the systemd units in the derivation.
Type: boolean
Default: false
Example: true
Declared by:
programs.systemd.system.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:
programs.systemd.system.slices.<name>.aliases
Aliases of that unit to be put under Install.Alias=
directive.
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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.slices.<name>.description
Description of this unit used in systemd messages and progress indicators.
Type: (optionally newline-terminated) single-line string
Default: ""
Declared by:
programs.systemd.system.slices.<name>.documentation
A list of URIs referencing documentation for this unit or its configuration.
Type: list of string
Default: [ ]
Declared by:
programs.systemd.system.slices.<name>.extraSectionsConfig
Additional sections with their configuration to be included. Each of attribute’s section name is prepended with X-
in the unit file.
Any sections prepended with |
Type: attribute set of attribute set of (systemd option)
Default: { }
Example:
{ "Custom Section" = { Hello = "there"; AnotherCustomConfigSettings = builtins.toString [ "SPACE" "DELIMITED" "VALUES" ]; }; "org.example.App" = { additional_search_path = lib.makeBinPath [ "/root" "/usr" "/usr/local" ]; }; }
Declared by:
programs.systemd.system.slices.<name>.filename
The filename of the systemd unit. This should be preferred to refer to the file path in the resulting output path where it can generate systemd drop-in units.
Type: string
Declared by:
programs.systemd.system.slices.<name>.installConfig
Settings under [Install]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ WantedBy = [ "default.target" ]; }
Declared by:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.slices.<name>.requiredBy
Units that require (i.e. depend on and need to go down with) this 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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.slices.<name>.settings
The settings for the systemd unit.
This could be used to completely override settings associated with the rest of the unit module such as Just use this only as a last resort if your target systemd version does not match with the module’s target version AND there’s no plausible way to set the unit directive you want. |
Type: attribute set of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string) or list of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string)))
Default: { }
Declared by:
programs.systemd.system.slices.<name>.sliceConfig
Each attribute in this set specifies an option in the [Slice]
section of the unit. See systemd.slice(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ MemoryMax = "2G"; }
Declared by:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.slices.<name>.unitConfig
Settings under [Unit]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ RequiresMountsFor = "/data"; }
Declared by:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.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 (programs.systemd.user.<name>.*
) set it to ["default.target"]
to make a unit start by default when the user <name>
logs on.
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:
programs.systemd.system.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:
programs.systemd.system.sockets
Set of systemd socket units to be placed in $out/etc/systemd/system/$UNITNAME
as described from systemd.socket(5).
Type: attribute set of (submodule)
Default: { }
Declared by:
programs.systemd.system.sockets.<name>.enableCommonDependencies
Whether to install additional dependencies on the generated scripts of systemd services.
These dependencies are simply additional GNU utilities such as coreutils
, findutils
, grep
, and sed
.
Type: boolean
Default: false
Example: true
Declared by:
programs.systemd.system.sockets.<name>.enableStatelessInstallation
Whether to enable stateless setup of the systemd units in the derivation.
Type: boolean
Default: false
Example: true
Declared by:
programs.systemd.system.sockets.<name>.enableStrictShellChecks
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 service and socket units. This does not affect command lines passed directly to ExecStart
, ExecReload
, ExecStartPre
, ExecStartPost
, ExecStop
or ExecStopPost
.
Type: boolean
Default: true
Declared by:
programs.systemd.system.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:
programs.systemd.system.sockets.<name>.aliases
Aliases of that unit to be put under Install.Alias=
directive.
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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.sockets.<name>.description
Description of this unit used in systemd messages and progress indicators.
Type: (optionally newline-terminated) single-line string
Default: ""
Declared by:
programs.systemd.system.sockets.<name>.documentation
A list of URIs referencing documentation for this unit or its configuration.
Type: list of string
Default: [ ]
Declared by:
programs.systemd.system.sockets.<name>.environment
Environment variables passed to the unit’s execution environment.
Type: attribute set of (null or string or absolute path or package)
Default: { }
Example:
{ LANG = "nl_NL.UTF-8"; PATH = "/foo/bar/bin"; }
Declared by:
programs.systemd.system.sockets.<name>.extraSectionsConfig
Additional sections with their configuration to be included. Each of attribute’s section name is prepended with X-
in the unit file.
Any sections prepended with |
Type: attribute set of attribute set of (systemd option)
Default: { }
Example:
{ "Custom Section" = { Hello = "there"; AnotherCustomConfigSettings = builtins.toString [ "SPACE" "DELIMITED" "VALUES" ]; }; "org.example.App" = { additional_search_path = lib.makeBinPath [ "/root" "/usr" "/usr/local" ]; }; }
Declared by:
programs.systemd.system.sockets.<name>.filename
The filename of the systemd unit. This should be preferred to refer to the file path in the resulting output path where it can generate systemd drop-in units.
Type: string
Declared by:
programs.systemd.system.sockets.<name>.installConfig
Settings under [Install]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ WantedBy = [ "default.target" ]; }
Declared by:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.sockets.<name>.path
Packages added to the service’s PATH
environment variable. Both the bin
and sbin
subdirectories of each package are added.
Type: list of (package or string)
Default: [ ]
Declared by:
programs.systemd.system.sockets.<name>.postStart
Shell commands executed after the execution environment’s main process is started.
Type: strings concatenated with “\n”
Default: ""
Declared by:
programs.systemd.system.sockets.<name>.postStop
Shell commands executed after the service’s main process has exited.
Type: strings concatenated with “\n”
Default: ""
Declared by:
programs.systemd.system.sockets.<name>.preStart
Shell commands executed before the execution environment’s main process is started.
Type: strings concatenated with “\n”
Default: ""
Declared by:
programs.systemd.system.sockets.<name>.preStop
Shell commands executed to stop the execution environment’s .
Type: strings concatenated with “\n”
Default: ""
Declared by:
programs.systemd.system.sockets.<name>.requiredBy
Units that require (i.e. depend on and need to go down with) this 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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.sockets.<name>.settings
The settings for the systemd unit.
This could be used to completely override settings associated with the rest of the unit module such as Just use this only as a last resort if your target systemd version does not match with the module’s target version AND there’s no plausible way to set the unit directive you want. |
Type: attribute set of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string) or list of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string)))
Default: { }
Declared by:
programs.systemd.system.sockets.<name>.socketConfig
Each attribute in this set specifies an option in the [Socket]
section of the unit. See systemd.socket(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ ListenStream = "/run/my-socket"; }
Declared by:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.sockets.<name>.unitConfig
Settings under [Unit]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ RequiresMountsFor = "/data"; }
Declared by:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.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 (programs.systemd.user.<name>.*
) set it to ["default.target"]
to make a unit start by default when the user <name>
logs on.
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:
programs.systemd.system.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:
programs.systemd.system.targets
Set of systemd target units to be placed in $out/etc/systemd/system/$UNITNAME
as described from systemd.target(5).
Type: attribute set of (submodule)
Default: { }
Declared by:
programs.systemd.system.targets.<name>.enableStatelessInstallation
Whether to enable stateless setup of the systemd units in the derivation.
Type: boolean
Default: false
Example: true
Declared by:
programs.systemd.system.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:
programs.systemd.system.targets.<name>.aliases
Aliases of that unit to be put under Install.Alias=
directive.
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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.targets.<name>.description
Description of this unit used in systemd messages and progress indicators.
Type: (optionally newline-terminated) single-line string
Default: ""
Declared by:
programs.systemd.system.targets.<name>.documentation
A list of URIs referencing documentation for this unit or its configuration.
Type: list of string
Default: [ ]
Declared by:
programs.systemd.system.targets.<name>.extraSectionsConfig
Additional sections with their configuration to be included. Each of attribute’s section name is prepended with X-
in the unit file.
Any sections prepended with |
Type: attribute set of attribute set of (systemd option)
Default: { }
Example:
{ "Custom Section" = { Hello = "there"; AnotherCustomConfigSettings = builtins.toString [ "SPACE" "DELIMITED" "VALUES" ]; }; "org.example.App" = { additional_search_path = lib.makeBinPath [ "/root" "/usr" "/usr/local" ]; }; }
Declared by:
programs.systemd.system.targets.<name>.filename
The filename of the systemd unit. This should be preferred to refer to the file path in the resulting output path where it can generate systemd drop-in units.
Type: string
Declared by:
programs.systemd.system.targets.<name>.installConfig
Settings under [Install]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ WantedBy = [ "default.target" ]; }
Declared by:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.targets.<name>.requiredBy
Units that require (i.e. depend on and need to go down with) this 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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.targets.<name>.settings
The settings for the systemd unit.
This could be used to completely override settings associated with the rest of the unit module such as Just use this only as a last resort if your target systemd version does not match with the module’s target version AND there’s no plausible way to set the unit directive you want. |
Type: attribute set of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string) or list of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string)))
Default: { }
Declared by:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.targets.<name>.unitConfig
Settings under [Unit]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ RequiresMountsFor = "/data"; }
Declared by:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.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 (programs.systemd.user.<name>.*
) set it to ["default.target"]
to make a unit start by default when the user <name>
logs on.
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:
programs.systemd.system.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:
programs.systemd.system.timers
Set of systemd timer units to be placed in $out/etc/systemd/system/$UNITNAME
as described from systemd.timer(5).
Type: attribute set of (submodule)
Default: { }
Example:
{ hello = { description = "Get an automated message from a script"; documentation = [ "man:hello" ]; timerConfig = { OnBootSec = "10m"; OnCalendar = "weekly"; }; wantedBy = [ "timers.target" ]; }; }
Declared by:
programs.systemd.system.timers.<name>.enableStatelessInstallation
Whether to enable stateless setup of the systemd units in the derivation.
Type: boolean
Default: false
Example: true
Declared by:
programs.systemd.system.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:
programs.systemd.system.timers.<name>.aliases
Aliases of that unit to be put under Install.Alias=
directive.
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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.timers.<name>.description
Description of this unit used in systemd messages and progress indicators.
Type: (optionally newline-terminated) single-line string
Default: ""
Declared by:
programs.systemd.system.timers.<name>.documentation
A list of URIs referencing documentation for this unit or its configuration.
Type: list of string
Default: [ ]
Declared by:
programs.systemd.system.timers.<name>.extraSectionsConfig
Additional sections with their configuration to be included. Each of attribute’s section name is prepended with X-
in the unit file.
Any sections prepended with |
Type: attribute set of attribute set of (systemd option)
Default: { }
Example:
{ "Custom Section" = { Hello = "there"; AnotherCustomConfigSettings = builtins.toString [ "SPACE" "DELIMITED" "VALUES" ]; }; "org.example.App" = { additional_search_path = lib.makeBinPath [ "/root" "/usr" "/usr/local" ]; }; }
Declared by:
programs.systemd.system.timers.<name>.filename
The filename of the systemd unit. This should be preferred to refer to the file path in the resulting output path where it can generate systemd drop-in units.
Type: string
Declared by:
programs.systemd.system.timers.<name>.installConfig
Settings under [Install]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ WantedBy = [ "default.target" ]; }
Declared by:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.timers.<name>.requiredBy
Units that require (i.e. depend on and need to go down with) this 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:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.timers.<name>.settings
The settings for the systemd unit.
This could be used to completely override settings associated with the rest of the unit module such as Just use this only as a last resort if your target systemd version does not match with the module’s target version AND there’s no plausible way to set the unit directive you want. |
Type: attribute set of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string) or list of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string)))
Default: { }
Declared by:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.timers.<name>.timerConfig
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.
Type: attribute set of (systemd option)
Default: { }
Example:
{ OnCalendar = "Sun 14:00:00"; Unit = "foo.service"; }
Declared by:
programs.systemd.system.timers.<name>.unitConfig
Settings under [Unit]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ RequiresMountsFor = "/data"; }
Declared by:
programs.systemd.system.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:
programs.systemd.system.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:
programs.systemd.system.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 (programs.systemd.user.<name>.*
) set it to ["default.target"]
to make a unit start by default when the user <name>
logs on.
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:
programs.systemd.system.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:
programs.systemd.system.units
systemd units definition as described from systemd.unit(5).
Type: attribute set of (submodule)
Default: { }
Declared by:
programs.systemd.system.units.<name>.enableStatelessInstallation
Whether to enable stateless setup of the systemd units in the derivation.
Type: boolean
Default: false
Example: true
Declared by:
programs.systemd.system.units.<name>.aliases
Aliases of that unit to be put under Install.Alias=
directive.
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:
programs.systemd.system.units.<name>.filename
The filename of the systemd unit. This should be preferred to refer to the file path in the resulting output path where it can generate systemd drop-in units.
Type: string
Declared by:
programs.systemd.system.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:
programs.systemd.system.units.<name>.requiredBy
Units that require (i.e. depend on and need to go down with) this 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:
programs.systemd.system.units.<name>.settings
The settings for the systemd unit.
This could be used to completely override settings associated with the rest of the unit module such as Just use this only as a last resort if your target systemd version does not match with the module’s target version AND there’s no plausible way to set the unit directive you want. |
Type: attribute set of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string) or list of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string)))
Default: { }
Declared by:
programs.systemd.system.units.<name>.text
Text of this systemd unit.
Type: null or string
Default: null
Declared by:
programs.systemd.system.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:
programs.systemd.system.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 (programs.systemd.user.<name>.*
) set it to ["default.target"]
to make a unit start by default when the user <name>
logs on.
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:
programs.systemd.user.automounts
Set of systemd automount units to be placed in $out/etc/systemd/user/$UNITNAME
as described from systemd.automount(5).
Type: attribute set of (submodule)
Default: { }
Declared by:
programs.systemd.user.automounts.<name>.enableStatelessInstallation
Whether to enable stateless setup of the systemd units in the derivation.
Type: boolean
Default: false
Example: true
Declared by:
programs.systemd.user.automounts.<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:
programs.systemd.user.automounts.<name>.aliases
Aliases of that unit to be put under Install.Alias=
directive.
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:
programs.systemd.user.automounts.<name>.automountConfig
Each attribute in this set specifies an option in the [Automount]
section of the unit. See systemd.automount(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ DirectoryMode = "0775"; }
Declared by:
programs.systemd.user.automounts.<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:
programs.systemd.user.automounts.<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:
programs.systemd.user.automounts.<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:
programs.systemd.user.automounts.<name>.description
Description of this unit used in systemd messages and progress indicators.
Type: (optionally newline-terminated) single-line string
Default: ""
Declared by:
programs.systemd.user.automounts.<name>.documentation
A list of URIs referencing documentation for this unit or its configuration.
Type: list of string
Default: [ ]
Declared by:
programs.systemd.user.automounts.<name>.extraSectionsConfig
Additional sections with their configuration to be included. Each of attribute’s section name is prepended with X-
in the unit file.
Any sections prepended with |
Type: attribute set of attribute set of (systemd option)
Default: { }
Example:
{ "Custom Section" = { Hello = "there"; AnotherCustomConfigSettings = builtins.toString [ "SPACE" "DELIMITED" "VALUES" ]; }; "org.example.App" = { additional_search_path = lib.makeBinPath [ "/root" "/usr" "/usr/local" ]; }; }
Declared by:
programs.systemd.user.automounts.<name>.filename
The filename of the systemd unit. This should be preferred to refer to the file path in the resulting output path where it can generate systemd drop-in units.
Type: string
Declared by:
programs.systemd.user.automounts.<name>.installConfig
Settings under [Install]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ WantedBy = [ "default.target" ]; }
Declared by:
programs.systemd.user.automounts.<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:
programs.systemd.user.automounts.<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:
programs.systemd.user.automounts.<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:
programs.systemd.user.automounts.<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:
programs.systemd.user.automounts.<name>.requiredBy
Units that require (i.e. depend on and need to go down with) this 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:
programs.systemd.user.automounts.<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:
programs.systemd.user.automounts.<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:
programs.systemd.user.automounts.<name>.settings
The settings for the systemd unit.
This could be used to completely override settings associated with the rest of the unit module such as Just use this only as a last resort if your target systemd version does not match with the module’s target version AND there’s no plausible way to set the unit directive you want. |
Type: attribute set of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string) or list of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string)))
Default: { }
Declared by:
programs.systemd.user.automounts.<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:
programs.systemd.user.automounts.<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:
programs.systemd.user.automounts.<name>.unitConfig
Settings under [Unit]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ RequiresMountsFor = "/data"; }
Declared by:
programs.systemd.user.automounts.<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:
programs.systemd.user.automounts.<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:
programs.systemd.user.automounts.<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 (programs.systemd.user.<name>.*
) set it to ["default.target"]
to make a unit start by default when the user <name>
logs on.
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:
programs.systemd.user.automounts.<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:
programs.systemd.user.automounts.<name>.where
Absolute path of a directory of the mount point. Will be created if it doesn’t exist. (Mandatory)
Type: string
Example: "/mnt"
Declared by:
programs.systemd.user.mounts
Set of systemd mount units to be placed in $out/etc/systemd/user/$UNITNAME
as described from systemd.mount(5).
Type: attribute set of (submodule)
Default: { }
Declared by:
programs.systemd.user.mounts.<name>.enableStatelessInstallation
Whether to enable stateless setup of the systemd units in the derivation.
Type: boolean
Default: false
Example: true
Declared by:
programs.systemd.user.mounts.<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:
programs.systemd.user.mounts.<name>.aliases
Aliases of that unit to be put under Install.Alias=
directive.
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:
programs.systemd.user.mounts.<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:
programs.systemd.user.mounts.<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:
programs.systemd.user.mounts.<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:
programs.systemd.user.mounts.<name>.description
Description of this unit used in systemd messages and progress indicators.
Type: (optionally newline-terminated) single-line string
Default: ""
Declared by:
programs.systemd.user.mounts.<name>.documentation
A list of URIs referencing documentation for this unit or its configuration.
Type: list of string
Default: [ ]
Declared by:
programs.systemd.user.mounts.<name>.extraSectionsConfig
Additional sections with their configuration to be included. Each of attribute’s section name is prepended with X-
in the unit file.
Any sections prepended with |
Type: attribute set of attribute set of (systemd option)
Default: { }
Example:
{ "Custom Section" = { Hello = "there"; AnotherCustomConfigSettings = builtins.toString [ "SPACE" "DELIMITED" "VALUES" ]; }; "org.example.App" = { additional_search_path = lib.makeBinPath [ "/root" "/usr" "/usr/local" ]; }; }
Declared by:
programs.systemd.user.mounts.<name>.filename
The filename of the systemd unit. This should be preferred to refer to the file path in the resulting output path where it can generate systemd drop-in units.
Type: string
Declared by:
programs.systemd.user.mounts.<name>.installConfig
Settings under [Install]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ WantedBy = [ "default.target" ]; }
Declared by:
programs.systemd.user.mounts.<name>.mountConfig
Each attribute in this set specifies an option in the [Mount]
section of the unit. See systemd.mount(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ DirectoryMode = "0775"; }
Declared by:
programs.systemd.user.mounts.<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:
programs.systemd.user.mounts.<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:
programs.systemd.user.mounts.<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:
programs.systemd.user.mounts.<name>.options
Options used to mount the file system.
Type: strings concatenated with “,”
Default: ""
Example: "noatime"
Declared by:
programs.systemd.user.mounts.<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:
programs.systemd.user.mounts.<name>.requiredBy
Units that require (i.e. depend on and need to go down with) this 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:
programs.systemd.user.mounts.<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:
programs.systemd.user.mounts.<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:
programs.systemd.user.mounts.<name>.settings
The settings for the systemd unit.
This could be used to completely override settings associated with the rest of the unit module such as Just use this only as a last resort if your target systemd version does not match with the module’s target version AND there’s no plausible way to set the unit directive you want. |
Type: attribute set of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string) or list of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string)))
Default: { }
Declared by:
programs.systemd.user.mounts.<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:
programs.systemd.user.mounts.<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:
programs.systemd.user.mounts.<name>.type
File system type.
Type: string
Default: ""
Example: "ext4"
Declared by:
programs.systemd.user.mounts.<name>.unitConfig
Settings under [Unit]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ RequiresMountsFor = "/data"; }
Declared by:
programs.systemd.user.mounts.<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:
programs.systemd.user.mounts.<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:
programs.systemd.user.mounts.<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 (programs.systemd.user.<name>.*
) set it to ["default.target"]
to make a unit start by default when the user <name>
logs on.
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:
programs.systemd.user.mounts.<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:
programs.systemd.user.mounts.<name>.what
Absolute path of device node, file or other resource. (Mandatory)
Type: string
Example: "/dev/sda1"
Declared by:
programs.systemd.user.mounts.<name>.where
Absolute path of a directory of the mount point. Will be created if it doesn’t exist. (Mandatory)
Type: string
Example: "/mnt"
Declared by:
programs.systemd.user.paths
Set of systemd path units to be placed in $out/etc/systemd/user/$UNITNAME
as described from systemd.path(5).
Type: attribute set of (submodule)
Default: { }
Declared by:
programs.systemd.user.paths.<name>.enableStatelessInstallation
Whether to enable stateless setup of the systemd units in the derivation.
Type: boolean
Default: false
Example: true
Declared by:
programs.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:
programs.systemd.user.paths.<name>.aliases
Aliases of that unit to be put under Install.Alias=
directive.
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:
programs.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:
programs.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:
programs.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:
programs.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:
programs.systemd.user.paths.<name>.documentation
A list of URIs referencing documentation for this unit or its configuration.
Type: list of string
Default: [ ]
Declared by:
programs.systemd.user.paths.<name>.extraSectionsConfig
Additional sections with their configuration to be included. Each of attribute’s section name is prepended with X-
in the unit file.
Any sections prepended with |
Type: attribute set of attribute set of (systemd option)
Default: { }
Example:
{ "Custom Section" = { Hello = "there"; AnotherCustomConfigSettings = builtins.toString [ "SPACE" "DELIMITED" "VALUES" ]; }; "org.example.App" = { additional_search_path = lib.makeBinPath [ "/root" "/usr" "/usr/local" ]; }; }
Declared by:
programs.systemd.user.paths.<name>.filename
The filename of the systemd unit. This should be preferred to refer to the file path in the resulting output path where it can generate systemd drop-in units.
Type: string
Declared by:
programs.systemd.user.paths.<name>.installConfig
Settings under [Install]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ WantedBy = [ "default.target" ]; }
Declared by:
programs.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:
programs.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:
programs.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:
programs.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:
programs.systemd.user.paths.<name>.pathConfig
Each attribute in this set specifies an option in the [Path]
section of the unit. See systemd.path(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ PathChanged = "/some/path"; Unit = "changedpath.service"; }
Declared by:
programs.systemd.user.paths.<name>.requiredBy
Units that require (i.e. depend on and need to go down with) this 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:
programs.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:
programs.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:
programs.systemd.user.paths.<name>.settings
The settings for the systemd unit.
This could be used to completely override settings associated with the rest of the unit module such as Just use this only as a last resort if your target systemd version does not match with the module’s target version AND there’s no plausible way to set the unit directive you want. |
Type: attribute set of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string) or list of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string)))
Default: { }
Declared by:
programs.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:
programs.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:
programs.systemd.user.paths.<name>.unitConfig
Settings under [Unit]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ RequiresMountsFor = "/data"; }
Declared by:
programs.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:
programs.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:
programs.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 (programs.systemd.user.<name>.*
) set it to ["default.target"]
to make a unit start by default when the user <name>
logs on.
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:
programs.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:
programs.systemd.user.services
Set of systemd service units to be placed in $out/etc/systemd/user/$UNITNAME
as described from systemd.service(5).
Type: attribute set of (submodule)
Default: { }
Example:
{ hello = { description = "wrapper-manager systemd service example"; path = with pkgs; [ hello ]; script = "hello"; startAt = "weekly"; }; nix-daemon = { description = "Fake Nix daemon build"; documentation = [ "man:nix-daemon" "https://nixos.org/manual" ]; unitConfig = { RequireMountsFor = [ "/nix/store" "/nix/var" "/nix/var/nix/db" ]; }; serviceConfig = { ExecStart = "@${lib.getExe' pkgs.nix "nix-daemon"} nix-daemon --daemon"; KillMode = "process"; LimitNOFILE = 1048576; TasksMax = 1048576; Delegate = "yes"; }; wantedBy = [ "multi-user.target" ]; }; }
Declared by:
programs.systemd.user.services.<name>.enableCommonDependencies
Whether to install additional dependencies on the generated scripts of systemd services.
These dependencies are simply additional GNU utilities such as coreutils
, findutils
, grep
, and sed
.
Type: boolean
Default: false
Example: true
Declared by:
programs.systemd.user.services.<name>.enableStatelessInstallation
Whether to enable stateless setup of the systemd units in the derivation.
Type: boolean
Default: false
Example: true
Declared by:
programs.systemd.user.services.<name>.enableStrictShellChecks
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 service and socket units. This does not affect command lines passed directly to ExecStart
, ExecReload
, ExecStartPre
, ExecStartPost
, ExecStop
or ExecStopPost
.
Type: boolean
Default: true
Declared by:
programs.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:
programs.systemd.user.services.<name>.aliases
Aliases of that unit to be put under Install.Alias=
directive.
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:
programs.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:
programs.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:
programs.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:
programs.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:
programs.systemd.user.services.<name>.documentation
A list of URIs referencing documentation for this unit or its configuration.
Type: list of string
Default: [ ]
Declared by:
programs.systemd.user.services.<name>.environment
Environment variables passed to the unit’s execution environment.
Type: attribute set of (null or string or absolute path or package)
Default: { }
Example:
{ LANG = "nl_NL.UTF-8"; PATH = "/foo/bar/bin"; }
Declared by:
programs.systemd.user.services.<name>.extraSectionsConfig
Additional sections with their configuration to be included. Each of attribute’s section name is prepended with X-
in the unit file.
Any sections prepended with |
Type: attribute set of attribute set of (systemd option)
Default: { }
Example:
{ "Custom Section" = { Hello = "there"; AnotherCustomConfigSettings = builtins.toString [ "SPACE" "DELIMITED" "VALUES" ]; }; "org.example.App" = { additional_search_path = lib.makeBinPath [ "/root" "/usr" "/usr/local" ]; }; }
Declared by:
programs.systemd.user.services.<name>.filename
The filename of the systemd unit. This should be preferred to refer to the file path in the resulting output path where it can generate systemd drop-in units.
Type: string
Declared by:
programs.systemd.user.services.<name>.installConfig
Settings under [Install]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ WantedBy = [ "default.target" ]; }
Declared by:
programs.systemd.user.services.<name>.listenOn
List of addresses to listen on. Each of the items will be included as part of Socket.ListenStream=
directive of the corresponding socket unit. See systemd.socket(5) for more details.
Type: list of string
Default: [ ]
Example:
[ "0.0.0.0:993" "/run/my-socket" ]
Declared by:
programs.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:
programs.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:
programs.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:
programs.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:
programs.systemd.user.services.<name>.path
Packages added to the service’s PATH
environment variable. Both the bin
and sbin
subdirectories of each package are added.
Type: list of (package or string)
Default: [ ]
Declared by:
programs.systemd.user.services.<name>.postStart
Shell commands executed after the execution environment’s main process is started.
Type: strings concatenated with “\n”
Default: ""
Declared by:
programs.systemd.user.services.<name>.postStop
Shell commands executed after the service’s main process has exited.
Type: strings concatenated with “\n”
Default: ""
Declared by:
programs.systemd.user.services.<name>.preStart
Shell commands executed before the execution environment’s main process is started.
Type: strings concatenated with “\n”
Default: ""
Declared by:
programs.systemd.user.services.<name>.preStop
Shell commands executed to stop the execution environment’s .
Type: strings concatenated with “\n”
Default: ""
Declared by:
programs.systemd.user.services.<name>.reload
Shell commands executed when the service’s main process is reloaded.
Type: strings concatenated with “\n”
Default: ""
Declared by:
programs.systemd.user.services.<name>.requiredBy
Units that require (i.e. depend on and need to go down with) this 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:
programs.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:
programs.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:
programs.systemd.user.services.<name>.script
Shell commands executed as the service’s main process.
Type: strings concatenated with “\n”
Default: ""
Declared by:
programs.systemd.user.services.<name>.scriptArgs
Arguments passed to the main process script. Can contain specifiers (%
placeholders expanded by systemd, see systemd.unit(5)).
Type: string
Default: ""
Example: "%i"
Declared by:
programs.systemd.user.services.<name>.serviceConfig
Each attribute in this set specifies an option in the [Service]
section of the unit. See systemd.service(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ RestartSec = 5; }
Declared by:
programs.systemd.user.services.<name>.settings
The settings for the systemd unit.
This could be used to completely override settings associated with the rest of the unit module such as Just use this only as a last resort if your target systemd version does not match with the module’s target version AND there’s no plausible way to set the unit directive you want. |
Type: attribute set of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string) or list of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string)))
Default: { }
Declared by:
programs.systemd.user.services.<name>.startAt
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.
Type: string or list of string
Default: [ ]
Example: "Sun 14:00:00"
Declared by:
programs.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:
programs.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:
programs.systemd.user.services.<name>.unitConfig
Settings under [Unit]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ RequiresMountsFor = "/data"; }
Declared by:
programs.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:
programs.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:
programs.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 (programs.systemd.user.<name>.*
) set it to ["default.target"]
to make a unit start by default when the user <name>
logs on.
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:
programs.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:
programs.systemd.user.services.<name>.watchFilesFrom
List of file globs to monitor changes to the files. Each of the items will be included as part of the Path.Modified=
directive as well as automatically create those directories with Path.MakeDirectory=
set to true of the corresponding path unit. See systemd.path(5) for more details.
Type: list of string
Default: [ ]
Example: [ ]
Declared by:
programs.systemd.user.slices
Set of systemd slice units to be placed in $out/etc/systemd/user/$UNITNAME
as described from systemd.slice(5).
Type: attribute set of (submodule)
Default: { }
Declared by:
programs.systemd.user.slices.<name>.enableStatelessInstallation
Whether to enable stateless setup of the systemd units in the derivation.
Type: boolean
Default: false
Example: true
Declared by:
programs.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:
programs.systemd.user.slices.<name>.aliases
Aliases of that unit to be put under Install.Alias=
directive.
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:
programs.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:
programs.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:
programs.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:
programs.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:
programs.systemd.user.slices.<name>.documentation
A list of URIs referencing documentation for this unit or its configuration.
Type: list of string
Default: [ ]
Declared by:
programs.systemd.user.slices.<name>.extraSectionsConfig
Additional sections with their configuration to be included. Each of attribute’s section name is prepended with X-
in the unit file.
Any sections prepended with |
Type: attribute set of attribute set of (systemd option)
Default: { }
Example:
{ "Custom Section" = { Hello = "there"; AnotherCustomConfigSettings = builtins.toString [ "SPACE" "DELIMITED" "VALUES" ]; }; "org.example.App" = { additional_search_path = lib.makeBinPath [ "/root" "/usr" "/usr/local" ]; }; }
Declared by:
programs.systemd.user.slices.<name>.filename
The filename of the systemd unit. This should be preferred to refer to the file path in the resulting output path where it can generate systemd drop-in units.
Type: string
Declared by:
programs.systemd.user.slices.<name>.installConfig
Settings under [Install]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ WantedBy = [ "default.target" ]; }
Declared by:
programs.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:
programs.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:
programs.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:
programs.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:
programs.systemd.user.slices.<name>.requiredBy
Units that require (i.e. depend on and need to go down with) this 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:
programs.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:
programs.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:
programs.systemd.user.slices.<name>.settings
The settings for the systemd unit.
This could be used to completely override settings associated with the rest of the unit module such as Just use this only as a last resort if your target systemd version does not match with the module’s target version AND there’s no plausible way to set the unit directive you want. |
Type: attribute set of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string) or list of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string)))
Default: { }
Declared by:
programs.systemd.user.slices.<name>.sliceConfig
Each attribute in this set specifies an option in the [Slice]
section of the unit. See systemd.slice(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ MemoryMax = "2G"; }
Declared by:
programs.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:
programs.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:
programs.systemd.user.slices.<name>.unitConfig
Settings under [Unit]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ RequiresMountsFor = "/data"; }
Declared by:
programs.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:
programs.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:
programs.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 (programs.systemd.user.<name>.*
) set it to ["default.target"]
to make a unit start by default when the user <name>
logs on.
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:
programs.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:
programs.systemd.user.sockets
Set of systemd socket units to be placed in $out/etc/systemd/user/$UNITNAME
as described from systemd.socket(5).
Type: attribute set of (submodule)
Default: { }
Declared by:
programs.systemd.user.sockets.<name>.enableCommonDependencies
Whether to install additional dependencies on the generated scripts of systemd services.
These dependencies are simply additional GNU utilities such as coreutils
, findutils
, grep
, and sed
.
Type: boolean
Default: false
Example: true
Declared by:
programs.systemd.user.sockets.<name>.enableStatelessInstallation
Whether to enable stateless setup of the systemd units in the derivation.
Type: boolean
Default: false
Example: true
Declared by:
programs.systemd.user.sockets.<name>.enableStrictShellChecks
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 service and socket units. This does not affect command lines passed directly to ExecStart
, ExecReload
, ExecStartPre
, ExecStartPost
, ExecStop
or ExecStopPost
.
Type: boolean
Default: true
Declared by:
programs.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:
programs.systemd.user.sockets.<name>.aliases
Aliases of that unit to be put under Install.Alias=
directive.
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:
programs.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:
programs.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:
programs.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:
programs.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:
programs.systemd.user.sockets.<name>.documentation
A list of URIs referencing documentation for this unit or its configuration.
Type: list of string
Default: [ ]
Declared by:
programs.systemd.user.sockets.<name>.environment
Environment variables passed to the unit’s execution environment.
Type: attribute set of (null or string or absolute path or package)
Default: { }
Example:
{ LANG = "nl_NL.UTF-8"; PATH = "/foo/bar/bin"; }
Declared by:
programs.systemd.user.sockets.<name>.extraSectionsConfig
Additional sections with their configuration to be included. Each of attribute’s section name is prepended with X-
in the unit file.
Any sections prepended with |
Type: attribute set of attribute set of (systemd option)
Default: { }
Example:
{ "Custom Section" = { Hello = "there"; AnotherCustomConfigSettings = builtins.toString [ "SPACE" "DELIMITED" "VALUES" ]; }; "org.example.App" = { additional_search_path = lib.makeBinPath [ "/root" "/usr" "/usr/local" ]; }; }
Declared by:
programs.systemd.user.sockets.<name>.filename
The filename of the systemd unit. This should be preferred to refer to the file path in the resulting output path where it can generate systemd drop-in units.
Type: string
Declared by:
programs.systemd.user.sockets.<name>.installConfig
Settings under [Install]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ WantedBy = [ "default.target" ]; }
Declared by:
programs.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:
programs.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:
programs.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:
programs.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:
programs.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:
programs.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:
programs.systemd.user.sockets.<name>.path
Packages added to the service’s PATH
environment variable. Both the bin
and sbin
subdirectories of each package are added.
Type: list of (package or string)
Default: [ ]
Declared by:
programs.systemd.user.sockets.<name>.postStart
Shell commands executed after the execution environment’s main process is started.
Type: strings concatenated with “\n”
Default: ""
Declared by:
programs.systemd.user.sockets.<name>.postStop
Shell commands executed after the service’s main process has exited.
Type: strings concatenated with “\n”
Default: ""
Declared by:
programs.systemd.user.sockets.<name>.preStart
Shell commands executed before the execution environment’s main process is started.
Type: strings concatenated with “\n”
Default: ""
Declared by:
programs.systemd.user.sockets.<name>.preStop
Shell commands executed to stop the execution environment’s .
Type: strings concatenated with “\n”
Default: ""
Declared by:
programs.systemd.user.sockets.<name>.requiredBy
Units that require (i.e. depend on and need to go down with) this 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:
programs.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:
programs.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:
programs.systemd.user.sockets.<name>.settings
The settings for the systemd unit.
This could be used to completely override settings associated with the rest of the unit module such as Just use this only as a last resort if your target systemd version does not match with the module’s target version AND there’s no plausible way to set the unit directive you want. |
Type: attribute set of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string) or list of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string)))
Default: { }
Declared by:
programs.systemd.user.sockets.<name>.socketConfig
Each attribute in this set specifies an option in the [Socket]
section of the unit. See systemd.socket(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ ListenStream = "/run/my-socket"; }
Declared by:
programs.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:
programs.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:
programs.systemd.user.sockets.<name>.unitConfig
Settings under [Unit]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ RequiresMountsFor = "/data"; }
Declared by:
programs.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:
programs.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:
programs.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 (programs.systemd.user.<name>.*
) set it to ["default.target"]
to make a unit start by default when the user <name>
logs on.
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:
programs.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:
programs.systemd.user.targets
Set of systemd target units to be placed in $out/etc/systemd/user/$UNITNAME
as described from systemd.target(5).
Type: attribute set of (submodule)
Default: { }
Declared by:
programs.systemd.user.targets.<name>.enableStatelessInstallation
Whether to enable stateless setup of the systemd units in the derivation.
Type: boolean
Default: false
Example: true
Declared by:
programs.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:
programs.systemd.user.targets.<name>.aliases
Aliases of that unit to be put under Install.Alias=
directive.
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:
programs.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:
programs.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:
programs.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:
programs.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:
programs.systemd.user.targets.<name>.documentation
A list of URIs referencing documentation for this unit or its configuration.
Type: list of string
Default: [ ]
Declared by:
programs.systemd.user.targets.<name>.extraSectionsConfig
Additional sections with their configuration to be included. Each of attribute’s section name is prepended with X-
in the unit file.
Any sections prepended with |
Type: attribute set of attribute set of (systemd option)
Default: { }
Example:
{ "Custom Section" = { Hello = "there"; AnotherCustomConfigSettings = builtins.toString [ "SPACE" "DELIMITED" "VALUES" ]; }; "org.example.App" = { additional_search_path = lib.makeBinPath [ "/root" "/usr" "/usr/local" ]; }; }
Declared by:
programs.systemd.user.targets.<name>.filename
The filename of the systemd unit. This should be preferred to refer to the file path in the resulting output path where it can generate systemd drop-in units.
Type: string
Declared by:
programs.systemd.user.targets.<name>.installConfig
Settings under [Install]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ WantedBy = [ "default.target" ]; }
Declared by:
programs.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:
programs.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:
programs.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:
programs.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:
programs.systemd.user.targets.<name>.requiredBy
Units that require (i.e. depend on and need to go down with) this 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:
programs.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:
programs.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:
programs.systemd.user.targets.<name>.settings
The settings for the systemd unit.
This could be used to completely override settings associated with the rest of the unit module such as Just use this only as a last resort if your target systemd version does not match with the module’s target version AND there’s no plausible way to set the unit directive you want. |
Type: attribute set of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string) or list of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string)))
Default: { }
Declared by:
programs.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:
programs.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:
programs.systemd.user.targets.<name>.unitConfig
Settings under [Unit]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ RequiresMountsFor = "/data"; }
Declared by:
programs.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:
programs.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:
programs.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 (programs.systemd.user.<name>.*
) set it to ["default.target"]
to make a unit start by default when the user <name>
logs on.
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:
programs.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:
programs.systemd.user.timers
Set of systemd timer units to be placed in $out/etc/systemd/user/$UNITNAME
as described from systemd.timer(5).
Type: attribute set of (submodule)
Default: { }
Example:
{ hello = { description = "Get an automated message from a script"; documentation = [ "man:hello" ]; timerConfig = { OnBootSec = "10m"; OnCalendar = "weekly"; }; wantedBy = [ "timers.target" ]; }; }
Declared by:
programs.systemd.user.timers.<name>.enableStatelessInstallation
Whether to enable stateless setup of the systemd units in the derivation.
Type: boolean
Default: false
Example: true
Declared by:
programs.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:
programs.systemd.user.timers.<name>.aliases
Aliases of that unit to be put under Install.Alias=
directive.
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:
programs.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:
programs.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:
programs.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:
programs.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:
programs.systemd.user.timers.<name>.documentation
A list of URIs referencing documentation for this unit or its configuration.
Type: list of string
Default: [ ]
Declared by:
programs.systemd.user.timers.<name>.extraSectionsConfig
Additional sections with their configuration to be included. Each of attribute’s section name is prepended with X-
in the unit file.
Any sections prepended with |
Type: attribute set of attribute set of (systemd option)
Default: { }
Example:
{ "Custom Section" = { Hello = "there"; AnotherCustomConfigSettings = builtins.toString [ "SPACE" "DELIMITED" "VALUES" ]; }; "org.example.App" = { additional_search_path = lib.makeBinPath [ "/root" "/usr" "/usr/local" ]; }; }
Declared by:
programs.systemd.user.timers.<name>.filename
The filename of the systemd unit. This should be preferred to refer to the file path in the resulting output path where it can generate systemd drop-in units.
Type: string
Declared by:
programs.systemd.user.timers.<name>.installConfig
Settings under [Install]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ WantedBy = [ "default.target" ]; }
Declared by:
programs.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:
programs.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:
programs.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:
programs.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:
programs.systemd.user.timers.<name>.requiredBy
Units that require (i.e. depend on and need to go down with) this 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:
programs.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:
programs.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:
programs.systemd.user.timers.<name>.settings
The settings for the systemd unit.
This could be used to completely override settings associated with the rest of the unit module such as Just use this only as a last resort if your target systemd version does not match with the module’s target version AND there’s no plausible way to set the unit directive you want. |
Type: attribute set of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string) or list of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string)))
Default: { }
Declared by:
programs.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:
programs.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:
programs.systemd.user.timers.<name>.timerConfig
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.
Type: attribute set of (systemd option)
Default: { }
Example:
{ OnCalendar = "Sun 14:00:00"; Unit = "foo.service"; }
Declared by:
programs.systemd.user.timers.<name>.unitConfig
Settings under [Unit]
section of the unit. See systemd.unit(5) for details.
Type: attribute set of (systemd option)
Default: { }
Example:
{ RequiresMountsFor = "/data"; }
Declared by:
programs.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:
programs.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:
programs.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 (programs.systemd.user.<name>.*
) set it to ["default.target"]
to make a unit start by default when the user <name>
logs on.
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:
programs.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:
programs.systemd.user.units
systemd units definition as described from systemd.unit(5).
Type: attribute set of (submodule)
Default: { }
Declared by:
programs.systemd.user.units.<name>.enableStatelessInstallation
Whether to enable stateless setup of the systemd units in the derivation.
Type: boolean
Default: false
Example: true
Declared by:
programs.systemd.user.units.<name>.aliases
Aliases of that unit to be put under Install.Alias=
directive.
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:
programs.systemd.user.units.<name>.filename
The filename of the systemd unit. This should be preferred to refer to the file path in the resulting output path where it can generate systemd drop-in units.
Type: string
Declared by:
programs.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:
programs.systemd.user.units.<name>.requiredBy
Units that require (i.e. depend on and need to go down with) this 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:
programs.systemd.user.units.<name>.settings
The settings for the systemd unit.
This could be used to completely override settings associated with the rest of the unit module such as Just use this only as a last resort if your target systemd version does not match with the module’s target version AND there’s no plausible way to set the unit directive you want. |
Type: attribute set of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string) or list of attribute set of (boolean or signed integer or absolute path or string or list of (boolean or signed integer or absolute path or string)))
Default: { }
Declared by:
programs.systemd.user.units.<name>.text
Text of this systemd unit.
Type: null or string
Default: null
Declared by:
programs.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:
programs.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 (programs.systemd.user.<name>.*
) set it to ["default.target"]
to make a unit start by default when the user <name>
logs on.
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:
wrappers
A set of wrappers to be included in the resulting derivation from wrapper-manager evaluation.
Type: attribute set of (submodule)
Default: { }
Example:
{ yt-dlp-audio = { arg0 = lib.getExe' pkgs.yt-dlp "yt-dlp"; prependArgs = [ "--config-location" ./config/yt-dlp/audio.conf ]; }; }
Declared by:
wrappers.<name>.appendArgs
A list of arguments to be appended to the user-given argument for the wrapper script.
Type: list of (string and select types (numbers, boolean, and path) convertible to it)
Default: [ ]
Example:
[ "--name" "doggo" "--location" "Your mom's home" ]
Declared by:
wrappers.<name>.arg0
The first argument of the wrapper script.
Type: string
Example: lib.getExe' pkgs.neofetch "neofetch"
Declared by:
wrappers.<name>.env
A global set of environment variables and their actions to be applied per-wrapper.
Type: attribute set of (submodule)
Default: { }
Example:
{ "FOO_TYPE".value = "custom"; "FOO_LOG_STYLE" = { action = "set-default"; value = "systemd"; }; "USELESS_VAR".action = "unset"; }
Declared by:
wrappers.<name>.env.<name>.action
Sets the appropriate action for the environment variable.
-
unset
… unsets the given variable. -
set-default
only sets the variable with the given value if not already set. -
set
forcibly sets the variable with given value. -
prefix
andsuffix
prepends and appends the environment variable containing a given separator-delimited list of values respectively. It requires thevalue
to be a list of string and aseparator
value.
Type: one of “unset”, “set”, “set-default”, “prefix”, “suffix”
Default: "set"
Example: "unset"
Declared by:
wrappers.<name>.env.<name>.separator
Separator used to create a character-delimited list of the environment variable holding a list of values.
Only used for |
Type: string
Default: ":"
Example: ";"
Declared by:
wrappers.<name>.env.<name>.value
The value of the variable that is holding.
It accepts a list of values only for |
Type: (string and select types (numbers, boolean, and path) convertible to it) or list of (string and select types (numbers, boolean, and path) convertible to it)
Example: "HELLO THERE"
Declared by:
wrappers.<name>.executableName
The name of the executable.
Type: non-empty string
Default: "‹name›"
Example: "custom-name"
Declared by:
wrappers.<name>.locale.enable
Whether to enable locale support for this wrapper. Recommended for Nix-built applications.
Type: boolean
Default: true
Example: false
Declared by:
wrappers.<name>.locale.package
The package containing glibc locales.
Type: package
Default: <derivation glibc-locales-2.40-66>
Declared by:
wrappers.<name>.makeWrapperArgs
A list of extra arguments to be passed as part of makeWrapper
build step.
Type: list of string
Example:
[ "--inherit-argv0" ]
Declared by:
wrappers.<name>.pathAdd
A global list of paths to be added per-wrapper as part of the PATH
environment variable.
Type: list of absolute path
Default: [ ]
Example:
wrapperManagerLib.getBin (with pkgs; [ yt-dlp gallery-dl ])
Declared by:
wrappers.<name>.preScript
Script fragments to run before the main executable.
This option is only used when |
Type: strings concatenated with “\n”
Default: ""
Example:
echo "HELLO WORLD!"
Declared by:
wrappers.<name>.prependArgs
A list of arguments to be prepended to the user-given argument for the wrapper script.
Type: list of (string and select types (numbers, boolean, and path) convertible to it)
Default: [ ]
Example:
[ "--config" ./config.conf ]
Declared by:
wrappers.<name>.systemd.enable
Whether to enable systemd unit generation associated with this wrapper.
Type: boolean
Default: false
Example: true
Declared by:
wrappers.<name>.systemd.pathUnit.enable
Whether to enable path unit generation.
Type: boolean
Default: false
Example: true
Declared by:
wrappers.<name>.systemd.pathUnit.settings
The systemd path unit settings for this wrapper configured the same way as programs.systemd.$VARIANT.paths.$NAME
.
Type: submodule
Default: { }
Declared by:
wrappers.<name>.systemd.serviceUnit.enable
Whether to enable service unit generation.
Type: boolean
Default: false
Example: true
Declared by:
wrappers.<name>.systemd.serviceUnit.settings
The systemd service unit settings for this wrapper configured the same way as programs.systemd.$VARIANT.services.$NAME
.
Type: submodule
Default: { }
Declared by:
wrappers.<name>.systemd.socketUnit.enable
Whether to enable socket unit generation.
Type: boolean
Default: false
Example: true
Declared by:
wrappers.<name>.systemd.socketUnit.settings
The systemd socket unit settings for this wrapper configured the same way as programs.systemd.$VARIANT.sockets.$NAME
.
Type: submodule
Default: { }
Declared by:
wrappers.<name>.systemd.timerUnit.enable
Whether to enable timer unit generation.
Type: boolean
Default: false
Example: true
Declared by:
wrappers.<name>.systemd.timerUnit.settings
The systemd timer unit settings for this wrapper configured the same way as programs.systemd.$VARIANT.timers.$NAME
.
Type: submodule
Default: { }
Declared by:
wrappers.<name>.systemd.variant
Determines where the unit will be placed as a system or a user unit.
Type: one of “system”, “user”
Default: "user"
Example: "system"
Declared by:
wrappers.<name>.xdg.configDirs
A list of paths to be appended as part of the XDG_CONFIG_DIRS
environment to be applied per-wrapper.
Type: list of string
Default: [ ]
Example:
wrapperManagerLib.getXdgConfigDirs (with pkgs; [ yt-dlp neofetch ])
Declared by:
wrappers.<name>.xdg.dataDirs
A list of paths to be appended as part of the XDG_DATA_DIRS
environment to be applied per-wrapper.
Type: list of string
Default: [ ]
Example:
wrapperManagerLib.getXdgDataDirs (with pkgs; [ yt-dlp neofetch ])
Declared by:
wrappers.<name>.xdg.desktopEntry.enable
Whether to enable automatic creation of a desktop entry for the wrapper.
Type: boolean
Default: false
Example: true
Declared by:
wrappers.<name>.xdg.desktopEntry.settings
Settings to be passed to the makeDesktopItem
builder.
Type: attribute set of anything
Example:
{ mimeTypes = [ "text/html" "text/xml" ]; categories = [ "Applications" "Network" ]; }
Declared by:
wrappers.<name>.xdg.desktopEntry.settings.categories
List of categories should the application be shown in a menu.
Type: list of non-empty string
Default: [ ]
Example:
[ "Applications" "Network" ]
Declared by:
wrappers.<name>.xdg.desktopEntry.settings.desktopName
Specific name of the application.
Type: non-empty string
Default: "‹name›"
Example: "Firefox"
Declared by:
wrappers.<name>.xdg.desktopEntry.settings.exec
Program with execute along with its arguments.
Type: null or non-empty string
Default: null
Example: "firefox %U"
Declared by:
wrappers.<name>.xdg.desktopEntry.settings.genericName
Generic name of the application.
Type: null or non-empty string
Default: null
Example: "Web browser"
Declared by:
wrappers.<name>.xdg.desktopEntry.settings.mimeTypes
The MIME types supported by the application.
Type: list of non-empty string
Default: [ ]
Example:
[ "text/html" "text/xml" ]
Declared by:
wrappers.<name>.xdg.desktopEntry.settings.name
The name of the desktop file.
Type: non-empty string
Default: "‹name›"
Example: "firefox"
Declared by:
wrappers.<name>.xdg.desktopEntry.settings.terminal
Whether the program runs in a terminal window.
Type: boolean
Default: false
Example: true
Declared by:
xdg.configDirs
A list of paths to be appended as part of the XDG_CONFIG_DIRS
environment to be applied per-wrapper.
Type: list of string
Default: [ ]
Example:
wrapperManagerLib.getXdgConfigDirs (with pkgs; [ yt-dlp neofetch ])
Declared by:
xdg.dataDirs
A list of paths to be appended as part of the XDG_DATA_DIRS
environment to be applied per-wrapper.
Type: list of string
Default: [ ]
Example:
wrapperManagerLib.getXdgDataDirs (with pkgs; [ yt-dlp neofetch ])
Declared by:
xdg.desktopEntries
A set of desktop entries to be exported along with the wrapped package. The attribute name will be used as the filename of the generated desktop entry file.
Type: attribute set of (attribute set of anything)
Default: { }
Example:
{ firefox = { name = "Firefox"; genericName = "Web browser"; exec = "firefox %u"; terminal = false; categories = [ "Application" "Network" "WebBrowser" ]; mimeTypes = [ "text/html" "text/xml" ]; extraConfig."X-GNOME-Autostart-Phase" = "WindowManager"; keywords = [ "Web" "Browser" ]; startupNotify = false; startupWMClass = "MyOwnClass"; }; }
Declared by:
xdg.desktopEntries.<name>.categories
List of categories should the application be shown in a menu.
Type: list of non-empty string
Default: [ ]
Example:
[ "Applications" "Network" ]
Declared by:
xdg.desktopEntries.<name>.desktopName
Specific name of the application.
Type: non-empty string
Default: "‹name›"
Example: "Firefox"
Declared by:
xdg.desktopEntries.<name>.exec
Program with execute along with its arguments.
Type: null or non-empty string
Default: null
Example: "firefox %U"
Declared by:
xdg.desktopEntries.<name>.genericName
Generic name of the application.
Type: null or non-empty string
Default: null
Example: "Web browser"
Declared by:
xdg.desktopEntries.<name>.mimeTypes
The MIME types supported by the application.
Type: list of non-empty string
Default: [ ]
Example:
[ "text/html" "text/xml" ]
Declared by:
xdg.desktopEntries.<name>.name
The name of the desktop file.
Type: non-empty string
Default: "‹name›"
Example: "firefox"
Declared by: