diff --git a/configs/niri/shared/index.kdl b/configs/niri/shared/index.kdl index b8a9e57..0c4d0fe 100644 --- a/configs/niri/shared/index.kdl +++ b/configs/niri/shared/index.kdl @@ -12,3 +12,4 @@ include "./alttab.kdl" include "./wpblur.kdl" include "./windowrules.kdl" include "./binds.kdl" +include "./startup.kdl" diff --git a/configs/niri/shared/startup.kdl b/configs/niri/shared/startup.kdl new file mode 100644 index 0000000..be52b87 --- /dev/null +++ b/configs/niri/shared/startup.kdl @@ -0,0 +1,2 @@ + +spawn-at-startup "niri-touchscreen-gestures" diff --git a/hosts/fwbook.nix b/hosts/fwbook.nix index 6fa3442..f8b219d 100644 --- a/hosts/fwbook.nix +++ b/hosts/fwbook.nix @@ -41,7 +41,6 @@ in enable = true; niri = { enable = true; - touchscreen-gestures.enable = true; }; }; }; @@ -150,9 +149,9 @@ in nodejs # Emulation - wineWowPackages.stable + wineWow64Packages.stable winetricks - wineWowPackages.waylandFull + wineWow64Packages.waylandFull # Video recording & editing obs-studio @@ -234,6 +233,9 @@ in hermes-agent.packages.${pkgs.stdenv.hostPlatform.system}.desktop hermes-agent.packages.${pkgs.stdenv.hostPlatform.system}.default + # My Own + niri-touchscreen-gestures + ]); services.usbmuxd.enable = true; services.flatpak.packages = [ diff --git a/modules/nixos/desktop/tiler/default.nix b/modules/nixos/desktop/tiler/default.nix index b7c7b7d..f100c2d 100644 --- a/modules/nixos/desktop/tiler/default.nix +++ b/modules/nixos/desktop/tiler/default.nix @@ -11,7 +11,6 @@ in imports = [ ./hyprland.nix ./niri.nix - ./niri-touchscreen-gestures.nix ./swww.nix ]; options = { diff --git a/modules/nixos/desktop/tiler/niri-touchscreen-gestures.nix b/modules/nixos/desktop/tiler/niri-touchscreen-gestures.nix deleted file mode 100644 index 5c8792c..0000000 --- a/modules/nixos/desktop/tiler/niri-touchscreen-gestures.nix +++ /dev/null @@ -1,61 +0,0 @@ -{ config -, lib -, pkgs -, ... -}: -let - cfg = config.skyg.nixos.desktop.tiler.niri.touchscreen-gestures; -in -{ - options = { - skyg.nixos.desktop.tiler.niri.touchscreen-gestures = { - enable = lib.mkEnableOption "niri touchscreen gesture support"; - }; - }; - - config = lib.mkIf cfg.enable { - assertions = [ - { - assertion = config.skyg.nixos.desktop.tiler.niri.enable; - message = "skyg.nixos.desktop.tiler.niri.touchscreen-gestures: niri must be enabled"; - } - ]; - - # Add the package to the system - environment.systemPackages = with pkgs; [ - niri-touchscreen-gestures - ]; - - # Create a user systemd service that runs the gesture detector - systemd.user.services.niri-touchscreen-gestures = { - description = "Niri touchscreen gesture detector"; - wantedBy = [ "graphical-session.target" ]; - partOf = [ "graphical-session.target" ]; - after = [ "niri.service" "graphical-session.target" ]; - requires = [ "niri.service" ]; - - serviceConfig = { - Type = "simple"; - ExecStart = "${pkgs.niri-touchscreen-gestures}/bin/niri-touchscreen-gestures"; - Restart = "on-failure"; - RestartSec = 3; - - # Environment for niri socket and logging - Environment = [ - "NIRI_SOCKET=%t/niri/socket" - "RUST_BACKTRACE=1" - ]; - - # Security hardening appropriate for input device access - NoNewPrivileges = true; - PrivateTmp = true; - ProtectSystem = "strict"; - ReadWritePaths = [ "/dev/input" "%t/niri" ]; - - # Allow binding to input devices - CapabilityBoundingSet = [ "CAP_SYS_NICE" ]; - DeviceAllow = [ "/dev/input/event* rw" ]; - }; - }; - }; -} diff --git a/modules/nixos/desktop/tiler/niri.nix b/modules/nixos/desktop/tiler/niri.nix index edf7593..06ad303 100644 --- a/modules/nixos/desktop/tiler/niri.nix +++ b/modules/nixos/desktop/tiler/niri.nix @@ -8,16 +8,9 @@ let cfg = config.skyg.nixos.desktop.tiler.niri; in { - imports = [ - ./niri-touchscreen-gestures.nix - ]; - options = { skyg.nixos.desktop.tiler.niri = { enable = lib.mkEnableOption "niri"; - touchscreen-gestures = { - enable = lib.mkEnableOption "touchscreen gesture support"; - }; }; }; config = lib.mkIf cfg.enable {