From 603971e590c068b3dfa2d576ec7724fcad6510aa Mon Sep 17 00:00:00 2001 From: GHOSCHT <31184695+GHOSCHT@users.noreply.github.com> Date: Sun, 7 Jan 2024 15:45:50 +0100 Subject: [PATCH] XRemap: Try to fix x11 gui application launching --- hosts/common/optional/desktop/xremap.nix | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/hosts/common/optional/desktop/xremap.nix b/hosts/common/optional/desktop/xremap.nix index 489898f..4b2c3e9 100644 --- a/hosts/common/optional/desktop/xremap.nix +++ b/hosts/common/optional/desktop/xremap.nix @@ -1,21 +1,38 @@ { 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 = "main remaps"; remap = { super-e = { - launch = ["firefox"]; + launch = ["${lib.getExe pkgs.pavucontrol}"]; }; }; }