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:
parent
b4c2844566
commit
6d31353099
2 changed files with 40 additions and 11 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue