Skip to content

Instantly share code, notes, and snippets.

@ivan
Last active January 7, 2019 16:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ivan/11f4dcdceced90812801ec505195fe80 to your computer and use it in GitHub Desktop.
Save ivan/11f4dcdceced90812801ec505195fe80 to your computer and use it in GitHub Desktop.
NixOS physlock: run command before lock and after unlock
{ config, lib, pkgs, ... }:
{
services.physlock.enable = true;
systemd.services."physlock".serviceConfig = {
# Run before physlock starts
ExecStartPre = "${pkgs.ityntolm}/bin/deny-usb-devices";
# Run after physlock stops
ExecStopPost = "${pkgs.ityntolm}/bin/allow-usb-devices";
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment