add swaylock as lock

This commit is contained in:
ulic-youthlic 2025-01-25 16:31:58 +08:00
parent b3781335ed
commit fcaa7b1d1c
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
4 changed files with 25 additions and 0 deletions

View file

@ -173,6 +173,7 @@ window-rule {
binds {
Super+V { spawn "bash" "-c" "cliphist list | fuzzel --dmenu | cliphist decode | wl-copy"; }
Super+Shift+L { spawn "bash" "-c" "swaylock --screenshots --clock --indicator --indicator-radius 100 --indicator-thickness 7 --effect-blur 7x5 --effect-vignette 0.5:0.5 --grace 2 --fade-in 0.5"; }
Mod+Shift+Slash { show-hotkey-overlay; }

View file

@ -27,6 +27,7 @@
./kvm.nix
./atuin.nix
./swaync.nix
./swaylock.nix
];
options = {

View file

@ -35,6 +35,7 @@ in
wluma.enable = true;
waybar.enable = true;
swaync.enable = true;
swaylock.enable = true;
};
programs.niri = {
config = builtins.readFile cfg.config;

22
home/modules/swaylock.nix Normal file
View file

@ -0,0 +1,22 @@
{
pkgs,
config,
lib,
...
}:
let
cfg = config.youthlic.programs.swaylock;
in
{
options = {
youthlic.programs.swaylock = {
enable = lib.mkEnableOption "swaylock";
};
};
config = lib.mkIf cfg.enable {
programs.swaylock = {
enable = true;
package = pkgs.swaylock-effects;
};
};
}