nix-files/hosts/common/programs/schlock.nix

22 lines
790 B
Nix

# limitations:
# - schlock fails open (pkill it and the wayland session is left unprotected)
# - schlock does not accept keyboard input; hence, unusable without a touchscreen
# - pin is not synchronized with PAM.
# - generate a hashed pin with: `mkpin`
{ config, lib, ... }:
let
cfg = config.sane.programs.schlock;
in
{
sane.programs.schlock = {
secrets.".config/schlock/schlock.pin" = ../../../secrets/common/schlock.pin.bin;
};
# TODO: needs access to schlock.pin inside of the swayidle sandbox
# sane.programs.swayidle.config = lib.mkIf cfg.enabled {
# actions.schlock.command = "schlock -p ~/.config/schlock/schlock.pin";
# # actions.swaylock.desktop = "schlock.desktop"; #< TODO: make a .desktop file
# actions.schlock.delay = 40; #< TODO: tune
# };
}