diff options
author | Profpatsch <mail@profpatsch.de> | 2022-05-05T22·34+0200 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2022-05-05T22·43+0000 |
commit | 54684f6c345dacf8a8122023c8c205d991e99044 (patch) | |
tree | 7f551e22579f3daf994aebb7ead26612ff156d9d /users/Profpatsch/aerc.nix | |
parent | 0c51608f6c11fd8e15679d77e7a9ae8c3a51fe78 (diff) |
feat(users/Profpatsch/aerc): use toINI r/4013
Uses the list-based toINI, which removes a lot of the complications caused by the INI DSL (it was fun to write but really not necessary). Change-Id: Ia6c30a726662416c99ed74f9eb33537573543383 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5530 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
Diffstat (limited to 'users/Profpatsch/aerc.nix')
-rw-r--r-- | users/Profpatsch/aerc.nix | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/users/Profpatsch/aerc.nix b/users/Profpatsch/aerc.nix index d37d10eb4626..569f045a00dc 100644 --- a/users/Profpatsch/aerc.nix +++ b/users/Profpatsch/aerc.nix @@ -20,29 +20,10 @@ let deps = [ ]; } { - concatNewline = lib.concatStringsSep "\n"; aercFilter = name: "${aerc-patched}/share/aerc/filters/${name}"; - toIni = getSections: - lib.generators.toINIWithGlobalSection { } - (getSections { } toIniDhall); + toIni = depot.users.Profpatsch.toINI { }; }; - toIniDhall = { - newSection = { }; - add = key: val: sect: sect // { ${key} = val; }; - addAll = keyVals: sect: sect // builtins.listToAttrs keyVals; - newSectionList = { }; - addSection = key: val: sect: sect // { ${key} = val; }; - }; - - - ini-file = name: ini: lib.pipe ini [ - (lib.generators.toINI { }) - (pkgs.writeText name) - ]; - - binds-file = name: binds: pkgs.writeText name binds; - aerc-config = pkgs.linkFarm "alacritty-config" [ { name = "aerc/accounts.conf"; @@ -54,7 +35,7 @@ let } { name = "aerc/binds.conf"; - path = binds-file "binds.conf" config.binds; + path = pkgs.writeText "binds.conf" config.binds; } ]; |