0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 13:40:28 +03:00

nixos: Add unit option overrideStrategy

This commit is contained in:
Christian Kögler 2022-08-06 22:29:56 +02:00
parent b4c2844566
commit 6d31353099
2 changed files with 40 additions and 11 deletions

View file

@ -48,6 +48,22 @@ in rec {
'';
};
overrideStrategy = mkOption {
default = "asDropinIfExists";
type = types.enum [ "asDropinIfExists" "asDropin" ];
description = lib.mdDoc ''
Defines how unit configuration is provided for systemd:
`asDropinIfExists` creates a unit file when no unit file is provided by the package
otherwise a drop-in file name `overrides.conf`.
`asDropin` creates a drop-in file named `overrides.conf`.
Mainly needed to define instances for systemd template units (e.g. `systemd-nspawn@mycontainer.service`).
See also systemd.unit(1).
'';
};
requiredBy = mkOption {
default = [];
type = types.listOf unitNameType;