2023-12-27 10:57:55 +01:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
inputs,
|
2024-01-07 15:45:50 +01:00
|
|
|
lib,
|
2023-12-27 10:57:55 +01:00
|
|
|
...
|
|
|
|
}: {
|
|
|
|
imports = [
|
|
|
|
inputs.xremap.nixosModules.default
|
|
|
|
];
|
|
|
|
|
2024-01-07 15:45:50 +01:00
|
|
|
hardware.uinput.enable = true;
|
|
|
|
users.groups.uinput.members = ["ghoscht"];
|
|
|
|
users.groups.input.members = ["ghoscht"];
|
|
|
|
|
|
|
|
systemd.user.services.set-xhost = {
|
|
|
|
description = "Run a one-shot command upon user login";
|
|
|
|
path = [pkgs.xorg.xhost];
|
|
|
|
wantedBy = ["default.target"];
|
|
|
|
script = "xhost +SI:localuser:root";
|
2024-02-16 12:32:19 +01:00
|
|
|
environment.DISPLAY = ":0"; # NOTE: This is hardcoded for this flake
|
2024-01-07 15:45:50 +01:00
|
|
|
};
|
|
|
|
|
2023-12-27 10:57:55 +01:00
|
|
|
services.xremap = {
|
|
|
|
withX11 = true;
|
2024-01-07 15:45:50 +01:00
|
|
|
watch = true;
|
2024-02-16 12:32:19 +01:00
|
|
|
debug = false;
|
2024-01-07 15:45:50 +01:00
|
|
|
userName = "ghoscht";
|
2024-02-16 12:32:19 +01:00
|
|
|
serviceMode = "user";
|
2023-12-27 10:57:55 +01:00
|
|
|
config = {
|
|
|
|
keymap = [
|
2024-02-04 20:53:38 +01:00
|
|
|
{
|
|
|
|
name = "Global";
|
2024-02-16 12:32:19 +01:00
|
|
|
remap = {
|
|
|
|
"CapsLock" = "Esc";
|
|
|
|
"Esc" = "CapsLock";
|
|
|
|
super-x = {
|
|
|
|
launch = ["${lib.getExe pkgs.wezterm}"];
|
|
|
|
};
|
|
|
|
# super-space = {
|
|
|
|
# launch = ["${lib.getExe pkgs.rofi}" "-i" "-show" "drun" "-show-icons"];
|
|
|
|
# };
|
|
|
|
# super-control-l = {
|
|
|
|
# launch = ["${lib.getExe pkgs.firefox}"];
|
|
|
|
# };
|
|
|
|
# super-control-shift-l = {
|
|
|
|
# launch = ["${lib.getExe pkgs.firefox}" "--private-window"];
|
|
|
|
# };
|
|
|
|
};
|
2024-02-04 20:53:38 +01:00
|
|
|
}
|
2023-12-27 10:57:55 +01:00
|
|
|
{
|
2024-02-16 12:32:19 +01:00
|
|
|
name = "Music";
|
2023-12-27 10:57:55 +01:00
|
|
|
remap = {
|
2024-02-16 12:32:19 +01:00
|
|
|
"KEY_PLAYPAUSE" = {
|
|
|
|
launch = ["${lib.getExe pkgs.playerctl}" "play-pause"];
|
|
|
|
};
|
|
|
|
"KEY_NEXTSONG" = {
|
|
|
|
launch = ["${lib.getExe pkgs.playerctl}" "next"];
|
|
|
|
};
|
|
|
|
"KEY_PREVIOUSSONG" = {
|
|
|
|
launch = ["${lib.getExe pkgs.playerctl}" "previous"];
|
2023-12-27 10:57:55 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|