no longer log out when yubikey is removed
This commit is contained in:
parent
19f05aec9f
commit
4b1e60ab0a
2 changed files with 6 additions and 28 deletions
|
@ -63,6 +63,9 @@ in
|
||||||
expect
|
expect
|
||||||
gptfdisk
|
gptfdisk
|
||||||
qrencode
|
qrencode
|
||||||
|
|
||||||
|
man-pages
|
||||||
|
man-pages-posix
|
||||||
]
|
]
|
||||||
++ optionals graphical [
|
++ optionals graphical [
|
||||||
wev
|
wev
|
||||||
|
@ -94,6 +97,8 @@ in
|
||||||
MANROFFOPT = "-c";
|
MANROFFOPT = "-c";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
documentation.dev.enable = true;
|
||||||
|
|
||||||
# virtualisation.docker.enable = true;
|
# virtualisation.docker.enable = true;
|
||||||
|
|
||||||
services.dbus.implementation = "broker";
|
services.dbus.implementation = "broker";
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
|
@ -18,36 +16,11 @@
|
||||||
boot.supportedFilesystems.zfs = true;
|
boot.supportedFilesystems.zfs = true;
|
||||||
|
|
||||||
# security.pam.yubico.control = "required";
|
# security.pam.yubico.control = "required";
|
||||||
|
|
||||||
services.udev.extraRules =
|
|
||||||
let
|
|
||||||
inherit (lib) getExe' getExe;
|
|
||||||
inherit (pkgs) procps writeShellScriptBin;
|
|
||||||
exitSway = writeShellScriptBin "kill-sway" ''
|
|
||||||
for pid in $(${getExe' procps "pgrep"} sway -x)
|
|
||||||
do
|
|
||||||
uid=$(id -u $(${getExe' procps "ps"} -o user= -p $pid))
|
|
||||||
export SWAYSOCK="/run/user/$uid/sway-ipc.$uid.$pid.sock"
|
|
||||||
if [[ -e "$SWAYSOCK" ]] ; then
|
|
||||||
echo "sock is $SWAYSOCK"
|
|
||||||
${getExe' config.programs.sway.package "swaymsg"} exit
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
''
|
|
||||||
ACTION=="remove",\
|
|
||||||
ENV{SUBSYSTEM}=="usb",\
|
|
||||||
ENV{PRODUCT}=="1050/407/543",\
|
|
||||||
RUN+="${lib.getExe exitSway}"
|
|
||||||
# '';
|
|
||||||
|
|
||||||
services.printing.cups-pdf.enable = true; # implies printing enable
|
services.printing.cups-pdf.enable = true; # implies printing enable
|
||||||
# services.printing.enable = true;
|
# services.printing.enable = true;
|
||||||
security.apparmor.enable = true;
|
security.apparmor.enable = true;
|
||||||
|
|
||||||
# RUN+="${lib.getExe' pkgs.systemd "loginctl"} lock-sessions"
|
|
||||||
|
|
||||||
# networking.hostId = "2ea79333";
|
# networking.hostId = "2ea79333";
|
||||||
# boot.kernelPackages = lib.mkForce config.boot.zfs.package.latestCompatibleLinuxPackages;
|
# boot.kernelPackages = lib.mkForce config.boot.zfs.package.latestCompatibleLinuxPackages;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue