Add fingerprint acpi rules & pre-6.9 power patches

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
2024-04-02 18:30:11 -04:00
committed by Alice Huston
parent 38d8b593f2
commit dd296c65a1
4 changed files with 220 additions and 0 deletions

View File

@ -38,4 +38,23 @@
security.pam.services.runuser-l.rules.auth.fprintd.order = 11501;
security.pam.services.groupmod.rules.auth.fprintd.order = 11501;
security.pam.services.runuser.rules.auth.fprintd.order = 11501;
# to auto-flip to password when the laptop lid is closed (ie. docked)
services.acpid = {
enable = true;
lidEventCommands = ''
export PATH=$PATH:/run/current-system/sw/bin
if grep -Fq closed /proc/acpi/button/lid/LID0/state; then
${pkgs.systemd}/bin/systemctl stop fprintd.service
${pkgs.coreutils}/bin/ln -s /dev/null /run/systemd/transient/fprintd.service
${pkgs.systemd}/bin/systemctl daemon-reload
else
${pkgs.coreutils}/bin/rm -f /run/systemd/transient/fprintd.service
${pkgs.systemd}/bin/systemctl daemon-reload
${pkgs.systemd}/bin/systemctlstart fprintd.service
fi
'';
};
}