nah systemd

This commit is contained in:
ari committed 2026-07-11 23:19:09 -04:00
1 parent 09480a73da
commit 75634c8df5
6 files changed
+8 -72

No files matched your search

-1
View File
@@ -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" ];
};
};
};
}
-7
View File
@@ -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 {