mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 22:43:01 +00:00
formats.systemd: init INI-style systemd config file format
This commit is contained in:
parent
f9a1ba6987
commit
ad586e6beb
@ -142,6 +142,20 @@ rec {
|
||||
|
||||
};
|
||||
|
||||
# As defined by systemd.syntax(7)
|
||||
#
|
||||
# null does not set any value, which allows for RFC42 modules to specify
|
||||
# optional config options.
|
||||
systemd = let
|
||||
mkValueString = lib.generators.mkValueStringDefault {};
|
||||
mkKeyValue = k: v:
|
||||
if v == null then "# ${k} is unset"
|
||||
else "${k} = ${mkValueString v}";
|
||||
in ini {
|
||||
listsAsDuplicateKeys = true;
|
||||
inherit mkKeyValue;
|
||||
};
|
||||
|
||||
keyValue = {
|
||||
# Represents lists as duplicate keys
|
||||
listsAsDuplicateKeys ? false,
|
||||
|
Loading…
Reference in New Issue
Block a user