2025-04-11 22:18:38 -05:00
|
|
|
{
|
2025-05-26 14:56:10 -05:00
|
|
|
flake,
|
2025-06-01 14:55:05 -05:00
|
|
|
lib,
|
2025-04-11 22:18:38 -05:00
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2025-05-26 14:56:10 -05:00
|
|
|
let
|
2025-05-31 20:44:18 -05:00
|
|
|
matchHelper = trigger: replace: {
|
|
|
|
trigger = trigger;
|
|
|
|
replace = replace;
|
|
|
|
};
|
|
|
|
configPath = ./config;
|
|
|
|
|
2025-06-01 14:55:05 -05:00
|
|
|
configs = {
|
|
|
|
url = { inherit flake matchHelper; };
|
|
|
|
logic = { inherit matchHelper; };
|
|
|
|
debate = { inherit matchHelper; };
|
|
|
|
characters = { inherit matchHelper; };
|
|
|
|
academic = { inherit matchHelper; };
|
|
|
|
numbers = { inherit matchHelper; };
|
|
|
|
email = { inherit flake matchHelper; };
|
|
|
|
};
|
|
|
|
|
2025-05-31 20:44:18 -05:00
|
|
|
baseMatches = {
|
2025-06-01 14:55:05 -05:00
|
|
|
matches = lib.concatMap (name: import (configPath + "/${name}.nix") configs.${name}) (
|
|
|
|
builtins.attrNames configs
|
|
|
|
);
|
2025-05-31 20:44:18 -05:00
|
|
|
};
|
2025-05-26 14:56:10 -05:00
|
|
|
in
|
2025-03-31 19:47:20 -05:00
|
|
|
{
|
|
|
|
services.espanso = {
|
|
|
|
enable = true;
|
2025-05-16 20:04:10 -05:00
|
|
|
configs = {
|
|
|
|
default = {
|
|
|
|
pre_paste_delay = 0;
|
|
|
|
show_notifications = false;
|
|
|
|
};
|
|
|
|
};
|
2025-05-10 00:21:19 -05:00
|
|
|
package = pkgs.espanso-wayland;
|
2025-03-31 19:47:20 -05:00
|
|
|
matches = {
|
2025-05-31 20:44:18 -05:00
|
|
|
base = baseMatches;
|
2025-03-31 19:47:20 -05:00
|
|
|
global_vars = {
|
|
|
|
global_vars = [
|
|
|
|
{
|
|
|
|
name = "currentdate";
|
|
|
|
type = "date";
|
|
|
|
params = {
|
|
|
|
format = "%d/%m/%Y";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "currenttime";
|
|
|
|
type = "date";
|
|
|
|
params = {
|
|
|
|
format = "%R";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|