- Removed unnecessary blank lines around `services.xremap.deviceNames` for cleaner formatting. - Aligns with consistent configuration style across `xremap.nix`.
32 lines
981 B
Nix
32 lines
981 B
Nix
# In /etc/nixos/configuration.nix
|
|
{ ... }:
|
|
{
|
|
users.users.harald.extraGroups = [ "input" ];
|
|
|
|
# Enable the xremap service
|
|
services.xremap.enable = true;
|
|
services.xremap.userName = "harald"; # Replace with your username
|
|
services.xremap.serviceMode = "user"; # Run as user service, not system-wide
|
|
services.xremap.withGnome = true;
|
|
|
|
# Add a specific configuration block to select your keyboard(s) by name
|
|
services.xremap.deviceNames = [
|
|
# Use the name found in the log output: "Hangsheng MonsGeek Keyboard System Control"
|
|
"Hangsheng MonsGeek Keyboard"
|
|
# You can usually shorten the name slightly to match the device you want
|
|
];
|
|
|
|
# Define your remapping configuration using Nix's attribute set format
|
|
services.xremap.config = {
|
|
keymap = [
|
|
{
|
|
remap = {
|
|
# Map Alt+C (LeftAlt-C) to Ctrl+C (LeftControl-C)
|
|
LeftAlt-C = "COPY";
|
|
LeftAlt-V = "PASTE";
|
|
LeftAlt-X = "CUT";
|
|
};
|
|
}
|
|
];
|
|
};
|
|
}
|