entirely vibed refactor
This commit is contained in:
parent
cea12431ff
commit
c343c52ab7
78 changed files with 884 additions and 1099 deletions
54
home/modules/services/espanso.nix
Normal file
54
home/modules/services/espanso.nix
Normal 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";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
11
home/modules/services/gnome-keyring.nix
Normal file
11
home/modules/services/gnome-keyring.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.gnome-keyring = {
|
||||
enable = true;
|
||||
components = [
|
||||
"ssh"
|
||||
"pkcs11"
|
||||
"secrets"
|
||||
];
|
||||
};
|
||||
}
|
||||
19
home/modules/services/mako.nix
Normal file
19
home/modules/services/mako.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
||||
47
home/modules/services/swayidle.nix
Normal file
47
home/modules/services/swayidle.nix
Normal 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";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
4
home/modules/services/syncthing.nix
Normal file
4
home/modules/services/syncthing.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.syncthing.enable = true;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue