1
0
Fork 0
forked from emily/nixfiles
nixfiles-emily/modules/graphical/hyprlock.nix

56 lines
1.7 KiB
Nix

{ config, lib, pkgs, ... }: {
config.home-manager.users.emily = lib.mkIf config.kyouma.graphical.enable {
programs.hyprlock = {
enable = true;
settings = {
general = {
hide_cursor = true;
disable_loading_bar = true;
};
background = [{
path = "screenshot";
#path = "$HOME/Pictures/wallpapers/lockscreen.png";
blur_passes = 3;
contrast = 1.25;
}];
input-field = [{
size = "250, 60";
outline_thickness = 2;
dots_size = 0.2;
dots_spacing = 0.2;
dots_center = true;
outer_color = "rgba(0, 0, 0, 0)";
inner_color = "rgba(0, 0, 0, 0.5)";
font_color = "rgb(200, 200, 200)";
fade_on_empty = true;
fade_timeout = 5000;
font_family = "JetBrains Mono Nerd Font Mono";
fail_text = "<i>$FAIL <b>$ATTEMPTS</b></i>";
position = "0, 200";
halign = "center";
valign = "bottom";
}];
label = [{
text = "cmd[update:250] date +%X";
color = "rgba(255, 255, 255, 0.6)";
font_size = "100";
font_family = "JetBrains Mono Nerd Font Mono ExtraBold";
position = "0, -300";
halign = "center";
valign = "top";
}];
};
};
services.swayidle =
let
hyprlock = "pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock";
in {
enable = true;
systemdTarget = "${config.kyouma.graphical.compositor}-session.target";
events = [
{ event = "before-sleep"; command = hyprlock; }
{ event = "lock"; command = hyprlock; }
];
};
};
}