mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-16 01:55:13 -05:00
feat: refactored espanso config
This commit is contained in:
parent
3d6ee99ecb
commit
9eb6982341
9 changed files with 123 additions and 36 deletions
|
@ -1,28 +1,30 @@
|
|||
{
|
||||
flake,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
||||
matchHelper = trigger: replace: {
|
||||
trigger = trigger;
|
||||
replace = replace;
|
||||
};
|
||||
|
||||
configPath = ./config;
|
||||
|
||||
configs = {
|
||||
url = { inherit flake matchHelper; };
|
||||
logic = { inherit matchHelper; };
|
||||
debate = { inherit matchHelper; };
|
||||
characters = { inherit matchHelper; };
|
||||
academic = { inherit matchHelper; };
|
||||
numbers = { inherit matchHelper; };
|
||||
email = { inherit flake matchHelper; };
|
||||
};
|
||||
|
||||
baseMatches = {
|
||||
matches =
|
||||
[ ]
|
||||
++ (import (configPath + /base.nix) { inherit matchHelper; })
|
||||
++ (import (configPath + /url.nix) { inherit flake matchHelper; })
|
||||
++ (import (configPath + /logic.nix) { inherit matchHelper; })
|
||||
++ (import (configPath + /debate.nix) { inherit matchHelper; })
|
||||
++ (import (configPath + /characters.nix) { inherit matchHelper; })
|
||||
++ (import (configPath + /academic.nix) { inherit matchHelper; })
|
||||
++ (import (configPath + /superscript.nix) { inherit matchHelper; })
|
||||
++ (import (configPath + /email.nix) { inherit flake matchHelper; });
|
||||
matches = lib.concatMap (name: import (configPath + "/${name}.nix") configs.${name}) (
|
||||
builtins.attrNames configs
|
||||
);
|
||||
};
|
||||
in
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue