github:dominicegginton/deadman
A USB-based dead man’s switch for Linux systems. Deadman monitors a tethered USB device and automatically locks all user sessions when the device is disconnected, providing physical security through systemd integration.
Deadman runs as a system daemon (deadmand) that monitors
USB devices you’ve tethered. When a tethered device is unplugged, the
daemon immediately locks all active user sessions using
loginctl lock-session. This provides a simple but effective
physical security mechanism.
Add the flake input to your system configuration:
{
inputs.deadman.url = "github:dominicegginton/deadman";
outputs = { self, nixpkgs, deadman, ... }: {
nixosConfigurations.your-hostname = nixpkgs.lib.nixosSystem {
modules = [
deadman.nixosModules.default
{ programs.deadman.enable = true; }
];
};
};
}List available USB devices:
deadmanTether a device (bus and address from device listing):
sudo deadman tether 1 5Check daemon status:
sudo deadman statusClear all active tethers without locking:
sudo deadman severeLaunch the GUI (automatically requests privileges when needed):
deadman-guiDeadman consists of four packages: deadmand (system
daemon), deadman (CLI client), deadman-gui
(GTK4 interface), and deadman-ipc (IPC library). The daemon
requires root privileges for USB monitoring and session control, while
client tools safely communicate through Unix domain sockets with user
identity verification.