{ pkgs, lib, config, ... }: with lib; let gui = with config.global.gpu; enable && session; in mkIf gui { security.pam.services.swaylock = { }; }