diff options
author | Silvan Mosberger <contact@infinisil.com> | 2022-05-12 20:46:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-12 20:46:39 +0200 |
commit | fd5082695297c4ab4e551ff771b8fe9e2f110d0c (patch) | |
tree | 191d6d050ab5150c14529c2d85465bc21a4d0ec9 /pkgs/pkgs-lib | |
parent | 914c76f1004c6e0770e6129b6c2b3673fb2c887f (diff) | |
parent | fd2616c92c81ba72ac72e433b2e3a055e324a97d (diff) | |
download | nixlib-fd5082695297c4ab4e551ff771b8fe9e2f110d0c.tar nixlib-fd5082695297c4ab4e551ff771b8fe9e2f110d0c.tar.gz nixlib-fd5082695297c4ab4e551ff771b8fe9e2f110d0c.tar.bz2 nixlib-fd5082695297c4ab4e551ff771b8fe9e2f110d0c.tar.lz nixlib-fd5082695297c4ab4e551ff771b8fe9e2f110d0c.tar.xz nixlib-fd5082695297c4ab4e551ff771b8fe9e2f110d0c.tar.zst nixlib-fd5082695297c4ab4e551ff771b8fe9e2f110d0c.zip |
Merge pull request #104457 from ju1m/public-inbox
Update public-inbox to 1.8.0 and add systemd services
Diffstat (limited to 'pkgs/pkgs-lib')
-rw-r--r-- | pkgs/pkgs-lib/formats.nix | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/pkgs-lib/formats.nix b/pkgs/pkgs-lib/formats.nix index 6495b024b008..cb46b63dd0c4 100644 --- a/pkgs/pkgs-lib/formats.nix +++ b/pkgs/pkgs-lib/formats.nix @@ -135,6 +135,17 @@ rec { }; + gitIni = { listsAsDuplicateKeys ? false, ... }@args: { + + type = with lib.types; let + + iniAtom = (ini args).type/*attrsOf*/.functor.wrapped/*attrsOf*/.functor.wrapped; + + in attrsOf (attrsOf (either iniAtom (attrsOf iniAtom))); + + generate = name: value: pkgs.writeText name (lib.generators.toGitINI value); + }; + toml = {}: json {} // { type = with lib.types; let valueType = oneOf [ |