Add fingerprint reader selection and lid-based routing

This commit is contained in:
Niklas Haiden
2026-09-21 19:02:37 +02:00
commit b8967e9505
15 changed files with 2979 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
[Unit]
Description=Select the fingerprint reader for the laptop lid state
Wants=dbus.service
After=dbus.service
[Service]
Type=simple
ExecStartPre=/usr/local/bin/fingerprint-switch prepare
ExecStart=/usr/local/bin/fingerprint-switch watch-lid
Restart=on-failure
RestartSec=3
RuntimeDirectory=fingerprint-switch
RuntimeDirectoryMode=0755
RuntimeDirectoryPreserve=yes
UMask=0077
# The watcher only reads lid/USB state and writes fprintd's environment file.
# Root identity allows its system-bus request to restart fprintd.
User=root
Group=root
NoNewPrivileges=true
CapabilityBoundingSet=
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/run/fingerprint-switch
PrivateTmp=true
PrivateDevices=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectControlGroups=true
ProtectClock=true
RestrictAddressFamilies=AF_UNIX
RestrictRealtime=true
RestrictSUIDSGID=true
LockPersonality=true
MemoryDenyWriteExecute=true
SystemCallFilter=@system-service
[Install]
WantedBy=multi-user.target