systemd
The systemd module streamlines the management of systemd units during image building. Units are divided into system and user categories, with system units managed directly using systemctl and user units using systemctl --global. You can specify which units to enable/disable or unmask/mask under each category.
You can also include your systemd units and drop-in files (allowing to override an existing unit) to be copied into system directories into these locations,
depending if your unit is system or user based:
files/systemd/system/
files/systemd/user/
The found files are then copied into these folders (depending on unit base):
/usr/lib/systemd/system
/usr/lib/systemd/user
The directory structure will be preserved:
for example the file files/systemd/system/getty@.d/autologin.conf will be copied into /usr/lib/system/getty@.d/.
Supported management operations are enabling, disabling, masking and unmasking.
Example configuration
Section titled “Example configuration”type: systemd# this example disables automatic flatpak updates and enables a custom service unit for all userssystem: disabled: - flatpak-system-update.timeruser: enabled: - my-custom.service disabled: - flatpak-user-update.timerConfiguration options
Section titled “Configuration options”system:
Section titled “system:”object
enabled[]:
Section titled “enabled[]:”array of string
List of systemd units to enable. (runs on system boot)
disabled[]:
Section titled “disabled[]:”array of string
List of systemd units to disable. (does not run on system boot, unless another unit strictly requires it)
masked[]:
Section titled “masked[]:”array of string
List of systemd units to mask. (does not run on system boot, under any circumstances)
unmasked[]:
Section titled “unmasked[]:”array of string
List of systemd units to unmask. (runs on system boot, even if previously masked)
System unit configuration.
object
enabled[]:
Section titled “enabled[]:”array of string
List of systemd units to enable. (runs for the users)
disabled[]:
Section titled “disabled[]:”array of string
List of systemd units to disable. (does not run for the users, unless another unit strictly requires it)
masked[]:
Section titled “masked[]:”array of string
List of systemd units to mask. (does not run for the users, under any circumstances)
unmasked[]:
Section titled “unmasked[]:”array of string
List of systemd units to unmask. (runs for the users, even if previously masked)
User unit configuration (with —global to make changes for all users).