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 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";

View file

@ -1,7 +1,5 @@
{ {
config, config,
lib,
pkgs,
... ...
}: }:
{ {
@ -19,35 +17,10 @@
# 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;