20 lines
646 B
Nix
20 lines
646 B
Nix
{ config, lib, ... }:
|
|
|
|
{
|
|
options.services.fingerprint-fix.enable = lib.mkEnableOption "Enable systemd service to restart fingerprint services after suspend.";
|
|
|
|
config = lib.mkIf config.services.fingerprint-fix.enable {
|
|
systemd.services.validity-restart = let
|
|
targets = [ "suspend.target" "hibernate.target" "hybrid-sleep.target" "suspend-then-hibernate.target" ];
|
|
in {
|
|
description = "Restart services to fix fingerprint integration";
|
|
wantedBy = targets;
|
|
after = targets;
|
|
serviceConfig = {
|
|
type = "oneshot";
|
|
ExecStart = "systemctl restart python3-validity.service";
|
|
};
|
|
};
|
|
};
|
|
}
|