lock screen

This commit is contained in:
2026-08-03 15:28:52 +09:00
parent 98397cf152
commit bdca6fb2fb
8 changed files with 8 additions and 43 deletions
+2 -2
View File
@@ -166,8 +166,8 @@ in
desktop_widgets.enabled = false;
lockscreen = {
enabled = false;
fingerprint = false;
enabled = true;
fingerprint = true;
};
osd.kinds = {
@@ -7,6 +7,5 @@
"applications.noctalia"
"services.ly"
"services.swayidle"
"services.swaylock"
];
}
-1
View File
@@ -7,6 +7,5 @@
"applications.noctalia"
"services.ly"
"services.swayidle"
"services.swaylock"
];
}
@@ -53,7 +53,7 @@ let
${wlopm} --on '*'
'';
in
lib.mkIf pkgs.stdenv.hostPlatform.isLinux {
{
services.swayidle = {
enable = true;
systemdTargets = [ "graphical-session.target" ];
@@ -75,7 +75,11 @@ lib.mkIf pkgs.stdenv.hostPlatform.isLinux {
resumeCommand = "${turnOnDisplays}";
}
];
events.after-resume = "${afterResume}";
events = {
after-resume = "${afterResume}";
lock = "loginctl lock-session";
before-sleep = "loginctl lock-session";
};
};
systemd.user.services.swayidle.Service.PassEnvironment = [
-3
View File
@@ -1,3 +0,0 @@
{
description = "swayidle idle management for Wayland sessions";
}
-23
View File
@@ -1,23 +0,0 @@
{ lib, pkgs, ... }:
{
home.packages = [ pkgs.swaylock ];
systemd.user.services.swaylock = {
Unit = {
Description = "Screen locker for Wayland";
Documentation = [ "man:swaylock(1)" ];
OnSuccess = [ "unlock.target" ];
PartOf = [ "lock.target" ];
Before = [ "lock.target" ];
};
Service = {
Type = "forking";
ExecStart = "${lib.getExe pkgs.swaylock} -f -i %h/.wallpapers/28.jpg";
Restart = "on-failure";
RestartSec = 0;
};
Install.WantedBy = [ "lock.target" ];
};
}
-10
View File
@@ -1,10 +0,0 @@
{ config, ... }:
{
services.systemd-lock-handler.enable = true;
security.pam.services.swaylock = {
fprintAuth = true;
rules.auth.fprintd.order = config.security.pam.services.swaylock.rules.auth.unix.order + 50;
};
}