entirely vibed refactor

This commit is contained in:
alisceon 2026-03-10 21:50:51 +01:00
parent cea12431ff
commit c343c52ab7
78 changed files with 884 additions and 1099 deletions

View file

@ -0,0 +1,54 @@
{ pkgs, repoRoot, ... }:
{
services.espanso = {
enable = true;
waylandSupport = true;
configs.default = {
toggle_key = "OFF";
preserve_clipboard = true;
show_notifications = true;
keyboard_layout.layout = "se";
};
matches = {
base.matches = [
{
trigger = ":ip ";
replace = "{{pubip}} ";
}
{
trigger = ":gw2hs ";
replace = "Full Homestead ^w^ ";
}
{
regex = ":format (?P<alphabet>\\S+) (?P<text>\\S+) ";
replace = "{{format_text}} ";
vars = [
{
name = "format_text";
type = "shell";
params.cmd = "${pkgs.python3}/bin/python3 ${repoRoot}/util/format_text.py $ESPANSO_ALPHABET $ESPANSO_TEXT";
}
];
}
{
regex = ";;(?P<emname>\\S+) ";
replace = "{{emoji}} ";
vars = [
{
name = "emoji";
type = "shell";
params.cmd = "${pkgs.python3}/bin/python3 ${repoRoot}/util/get_emoji.py $ESPANSO_EMNAME";
}
];
}
];
global_vars.global_vars = [
{
name = "pubip";
type = "shell";
params.cmd = "curl -s https://ifconfig.me";
}
];
};
};
}

View file

@ -0,0 +1,11 @@
{ ... }:
{
services.gnome-keyring = {
enable = true;
components = [
"ssh"
"pkcs11"
"secrets"
];
};
}

View file

@ -0,0 +1,19 @@
{ ... }:
{
services.mako = {
enable = true;
settings = {
actions = true;
anchor = "top-center";
border-radius = 0;
default-timeout = 10000;
height = 100;
width = 600;
icons = true;
ignore-timeout = false;
layer = "overlay";
margin = 10;
markup = true;
};
};
}

View file

@ -0,0 +1,47 @@
{ pkgs, ... }:
let
commands = import ../../../lib/commands.nix { inherit pkgs; };
inherit (commands) notify lock display;
in
{
services.swayidle = {
enable = true;
timeouts = [
{
timeout = 120;
command = "${notify} 'Locking in 5 seconds' -t 5000";
}
{
timeout = 125;
command = lock;
}
{
timeout = 125;
command = display "off";
resumeCommand = display "on";
}
{
timeout = 600;
command = "${pkgs.systemd}/bin/systemctl suspend";
}
];
events = [
{
event = "before-sleep";
command = "display off; systemctl --user stop libinput-gestures; ${lock}";
}
{
event = "after-resume";
command = "display on; systemctl --user start libinput-gestures";
}
{
event = "lock";
command = (display "off") + "; " + lock;
}
{
event = "unlock";
command = display "on";
}
];
};
}

View file

@ -0,0 +1,4 @@
{ ... }:
{
services.syncthing.enable = true;
}