pinwheel: Extract swaylock module

This commit is contained in:
Alexander Heldt
2023-08-26 17:16:59 +02:00
parent 77314fece4
commit 11ae4d3282
4 changed files with 34 additions and 19 deletions

View File

@@ -1,4 +1,4 @@
{ home-manager, pkgs, ... }:
{ home-manager, ... }:
{
home-manager.users.alex = {
wayland.windowManager.hyprland = {
@@ -66,7 +66,6 @@
move = builtins.genList (x: "$mod SHIFT, ${ws x}, movetoworkspacesilent, ${builtins.toString (x + 1)}") 10;
in
select ++ move ++ [
"$mod, x, exec, ${pkgs.swaylock}/bin/swaylock"
"$mod SHIFT, x, exec, systemctl suspend"
"$mod, SPACE, exec, bemenu-run --fn 'DejaVuSansM Nerd Font Mono 14'"

View File

@@ -0,0 +1,32 @@
{ home-manager, pkgs, ... }:
{
home-manager.users.alex = {
programs.swaylock = {
enable = true;
settings = {
color = "000000";
indicator-idle-visible = false;
show-failed-attempts = true;
};
};
wayland.windowManager.hyprland = {
settings = {
bind = [
"$mod, x, exec, ${pkgs.swaylock}/bin/swaylock"
];
};
};
};
security = {
polkit.enable = true;
pam.services.swaylock.text = ''
# PAM configuration file for the swaylock screen locker. By default, it includes
# the 'login' configuration file (see /etc/pam.d/login)
auth include login
'';
};
}