2024-03-07 10:10:39 +00:00
|
|
|
# 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`
|
2024-03-08 08:16:11 +00:00
|
|
|
# - does not seem to render in landscape mode
|
2024-03-07 10:10:39 +00:00
|
|
|
|
|
|
|
{ config, lib, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.sane.programs.schlock;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
sane.programs.schlock = {
|
2024-03-07 10:32:01 +00:00
|
|
|
sandbox.method = "bwrap";
|
|
|
|
sandbox.whitelistWayland = true;
|
|
|
|
|
2024-03-07 10:10:39 +00:00
|
|
|
secrets.".config/schlock/schlock.pin" = ../../../secrets/common/schlock.pin.bin;
|
|
|
|
};
|
2024-03-07 10:32:01 +00:00
|
|
|
|
|
|
|
sane.programs.swayidle.config = lib.mkIf cfg.enabled {
|
|
|
|
actions.schlock.desktop = "schlock.desktop";
|
|
|
|
actions.schlock.delay = 1800;
|
|
|
|
};
|
2024-03-07 10:10:39 +00:00
|
|
|
}
|