nix-config/hosts/common/optional/desktop/xremap.nix

43 lines
877 B
Nix
Raw Normal View History

2023-12-27 10:57:55 +01:00
{
pkgs,
inputs,
lib,
2023-12-27 10:57:55 +01:00
...
}: {
imports = [
inputs.xremap.nixosModules.default
];
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";
environment.DISPLAY = "DP-4"; # NOTE: This is hardcoded for this flake
};
2023-12-27 10:57:55 +01:00
services.xremap = {
withX11 = true;
watch = true;
# debug = true;
userName = "ghoscht";
serviceMode = "system";
2023-12-27 10:57:55 +01:00
config = {
keymap = [
{
name = "main remaps";
remap = {
super-e = {
launch = ["${lib.getExe pkgs.pavucontrol}"];
2023-12-27 10:57:55 +01:00
};
};
}
];
};
};
}