46 lines
998 B
Nix
46 lines
998 B
Nix
{
|
|
pkgs,
|
|
inputs,
|
|
lib,
|
|
...
|
|
}: {
|
|
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
|
|
};
|
|
|
|
services.xremap = {
|
|
withX11 = true;
|
|
watch = true;
|
|
# debug = true;
|
|
userName = "ghoscht";
|
|
serviceMode = "system";
|
|
config = {
|
|
keymap = [
|
|
{
|
|
name = "Global";
|
|
remap = {"CapsLock" = "Esc";}; # globally remap CapsLock to Esc
|
|
}
|
|
{
|
|
name = "main remaps";
|
|
remap = {
|
|
super-e = {
|
|
launch = ["${lib.getExe pkgs.pavucontrol}"];
|
|
};
|
|
};
|
|
}
|
|
];
|
|
};
|
|
};
|
|
}
|