Merge branch 'main' of ssh://grimmauld.de:2222/Grimmauld/grimm-nixos-laptop

This commit is contained in:
Grimmauld 2024-12-01 12:37:32 +01:00
commit 564d6b8209
2 changed files with 6 additions and 28 deletions

View file

@ -63,6 +63,9 @@ in
expect
gptfdisk
qrencode
man-pages
man-pages-posix
]
++ optionals graphical [
wev
@ -94,6 +97,8 @@ in
MANROFFOPT = "-c";
};
documentation.dev.enable = true;
# virtualisation.docker.enable = true;
services.dbus.implementation = "broker";

View file

@ -1,7 +1,5 @@
{
config,
lib,
pkgs,
...
}:
{
@ -18,36 +16,11 @@
boot.supportedFilesystems.zfs = true;
# 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.enable = true;
security.apparmor.enable = true;
# RUN+="${lib.getExe' pkgs.systemd "loginctl"} lock-sessions"
# networking.hostId = "2ea79333";
# boot.kernelPackages = lib.mkForce config.boot.zfs.package.latestCompatibleLinuxPackages;