{ flake, pkgs, ... }: let matchHelper = trigger: replace: { trigger = trigger; replace = replace; }; configPath = ./config; 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; }); }; in { services.espanso = { enable = true; configs = { default = { pre_paste_delay = 0; show_notifications = false; }; }; package = pkgs.espanso-wayland; matches = { base = baseMatches; global_vars = { global_vars = [ { name = "currentdate"; type = "date"; params = { format = "%d/%m/%Y"; }; } { name = "currenttime"; type = "date"; params = { format = "%R"; }; } ]; }; }; }; }