nah systemd
This commit is contained in:
1 parent
09480a73da
commit
75634c8df5
6 files changed
+8
-72
No files matched your search
@@ -12,3 +12,4 @@ include "./alttab.kdl"
|
||||
include "./wpblur.kdl"
|
||||
include "./windowrules.kdl"
|
||||
include "./binds.kdl"
|
||||
include "./startup.kdl"
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
spawn-at-startup "niri-touchscreen-gestures"
|
||||
+5
-3
@@ -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 = [
|
||||
|
||||
@@ -11,7 +11,6 @@ in
|
||||
imports = [
|
||||
./hyprland.nix
|
||||
./niri.nix
|
||||
./niri-touchscreen-gestures.nix
|
||||
./swww.nix
|
||||
];
|
||||
options = {
|
||||
|
||||
@@ -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" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user