mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-06 10:08:11 +09:00
lock screen
This commit is contained in:
@@ -313,7 +313,6 @@ use fully qualified unit IDs:
|
|||||||
"applications.noctalia"
|
"applications.noctalia"
|
||||||
"services.ly"
|
"services.ly"
|
||||||
"services.swayidle"
|
"services.swayidle"
|
||||||
"services.swaylock"
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -166,8 +166,8 @@ in
|
|||||||
|
|
||||||
desktop_widgets.enabled = false;
|
desktop_widgets.enabled = false;
|
||||||
lockscreen = {
|
lockscreen = {
|
||||||
enabled = false;
|
enabled = true;
|
||||||
fingerprint = false;
|
fingerprint = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
osd.kinds = {
|
osd.kinds = {
|
||||||
|
|||||||
@@ -7,6 +7,5 @@
|
|||||||
"applications.noctalia"
|
"applications.noctalia"
|
||||||
"services.ly"
|
"services.ly"
|
||||||
"services.swayidle"
|
"services.swayidle"
|
||||||
"services.swaylock"
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,5 @@
|
|||||||
"applications.noctalia"
|
"applications.noctalia"
|
||||||
"services.ly"
|
"services.ly"
|
||||||
"services.swayidle"
|
"services.swayidle"
|
||||||
"services.swaylock"
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ let
|
|||||||
${wlopm} --on '*'
|
${wlopm} --on '*'
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
lib.mkIf pkgs.stdenv.hostPlatform.isLinux {
|
{
|
||||||
services.swayidle = {
|
services.swayidle = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemdTargets = [ "graphical-session.target" ];
|
systemdTargets = [ "graphical-session.target" ];
|
||||||
@@ -75,7 +75,11 @@ lib.mkIf pkgs.stdenv.hostPlatform.isLinux {
|
|||||||
resumeCommand = "${turnOnDisplays}";
|
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 = [
|
systemd.user.services.swayidle.Service.PassEnvironment = [
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
description = "swayidle idle management for Wayland sessions";
|
|
||||||
}
|
|
||||||
@@ -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" ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -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;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user