diff --git a/configuration.nix b/configuration.nix index 99866bf..f50b1d1 100755 --- a/configuration.nix +++ b/configuration.nix @@ -19,6 +19,7 @@ # ./system-modules/hsmw.nix # old ./system-modules/docker.nix ./system-modules/health_reminder.nix + ./system-modules/ydotool.nix ./system-modules/ollama.nix ./system-modules/nx2site.nix ./system-modules/kodi.nix diff --git a/home-modules/gestures.nix b/home-modules/gestures.nix index 4fa7f61..5dea219 100755 --- a/home-modules/gestures.nix +++ b/home-modules/gestures.nix @@ -1,32 +1,16 @@ -{ config, pkgs, lib, host, ... }: +{ pkgs, lib, host, ... }: lib.mkIf (host == "NxXPS") { - home.packages = [ - pkgs.libinput-gestures - pkgs.ydotool + home.packages = with pkgs; [ + libinput-gestures ]; - home.file.".config/libinput/gestures".text = '' + home.file.".config/libinput-gestures.conf".text = '' # Swipe threshold (0-100) swipe_threshold 0 # Gestures - gesture swipe left 3 echo key k:276 | dotool - gesture swipe right 3 echo key k:275 | dotool + gesture swipe right 3 ydotool key 158:1 158:0 # back + gesture swipe left 3 ydotool key 159:1 159:0 # forward ''; - # systemd.user.services = { - # ydotoold = { - # Unit = { - # Description = "An auto-input utility for wayland"; - # Documentation = [ "man:ydotool(1)" "man:ydotoold(8)" ]; - # }; - - # Service = { - # ExecStart = "/run/current-system/sw/bin/ydotoold --socket-path /tmp/ydotool_socket "; - # }; - # Install = { - # WantedBy = ["default.target"]; - # }; - # }; - # }; } diff --git a/system-modules/users.nix b/system-modules/users.nix index 7ade1d9..1ebe8ce 100755 --- a/system-modules/users.nix +++ b/system-modules/users.nix @@ -5,7 +5,7 @@ users.users."${user}" = { isNormalUser = true; - extraGroups = [ "networkmanager" "wheel" "audio" "video" "docker" "libvirtd" "uinput" ]; + extraGroups = [ "networkmanager" "wheel" "audio" "video" "docker" "libvirtd" "uinput" "input" "ydotool" ]; useDefaultShell = true; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID1RPCcS8DtIf75a2FEW4d8X6WTVeLlmretoLqppvZlJ" # From [A] GPG Sub Key diff --git a/system-modules/ydotool.nix b/system-modules/ydotool.nix new file mode 100644 index 0000000..01e4c23 --- /dev/null +++ b/system-modules/ydotool.nix @@ -0,0 +1,5 @@ +{ pkgs, lib, host, ... }: +lib.mkIf (host == "NxXPS") +{ + programs.ydotool.enable = true; +}