tvl-depot/users/Profpatsch/aerc.nix
Profpatsch 54684f6c34 feat(users/Profpatsch/aerc): use toINI
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>
2022-05-05 22:43:08 +00:00

51 lines
1 KiB
Nix

{ depot, pkgs, lib, ... }:
let
aerc-patched = pkgs.aerc.overrideAttrs (old: {
patches = old.patches or [ ] ++ [
./aerc-no-config-perms.patch
];
});
bins = depot.nix.getBins aerc-patched [ "aerc" ];
config =
depot.users.Profpatsch.importDhall.importDhall
{
root = ./.;
files = [
"aerc.dhall"
];
main = "aerc.dhall";
deps = [ ];
}
{
aercFilter = name: "${aerc-patched}/share/aerc/filters/${name}";
toIni = depot.users.Profpatsch.toINI { };
};
aerc-config = pkgs.linkFarm "alacritty-config" [
{
name = "aerc/accounts.conf";
path = pkgs.writeText "accounts.conf" config.accounts;
}
{
name = "aerc/aerc.conf";
path = pkgs.writeText "aerc.conf" config.aerc;
}
{
name = "aerc/binds.conf";
path = pkgs.writeText "binds.conf" config.binds;
}
];
aerc = depot.nix.writeExecline "aerc" { } [
"export"
"XDG_CONFIG_HOME"
aerc-config
bins.aerc
"$@"
];
in
aerc