63 lines
2.2 KiB
Nix
63 lines
2.2 KiB
Nix
{ modules, ... }:
|
|
{
|
|
modules.hyprlock = {
|
|
homeManager =
|
|
_:
|
|
let
|
|
# Palette extracted from the hyprpaper wallpaper so the input field
|
|
# matches the background. Regenerate and update when Wallpaper.jpg
|
|
# changes:
|
|
# nix run nixpkgs#matugen -- image ~/Wallpaper.jpg -m dark \
|
|
# --source-color-index 0 --dry-run --show-colors
|
|
#
|
|
# name (matugen token) hex rgb()
|
|
primary = "rgb(135, 209, 235)"; # #87D1EB accent / success
|
|
tertiary = "rgb(194, 195, 235)"; # #C2C3EB capslock
|
|
error = "rgb(255, 180, 171)"; # #FFB4AB failure
|
|
outline = "rgb(137, 146, 150)"; # #899296 neutral border
|
|
on_surface = "rgb(222, 227, 230)"; # #DEE3E6 text/dots
|
|
inner_color = "rgba(27, 32, 35, 0.6)"; # #1B2023 @ 60%
|
|
in
|
|
{
|
|
programs.hyprlock = {
|
|
enable = true;
|
|
settings = {
|
|
# Reuse the hyprpaper wallpaper (see doloro-settings hyprpaper
|
|
# config) as the lock screen background. monitor = "" covers every
|
|
# output.
|
|
background = [
|
|
{
|
|
monitor = "";
|
|
path = "/home/doloro/Wallpaper.jpg";
|
|
}
|
|
];
|
|
# hyprlock has no input-field by default, so one must be declared
|
|
# explicitly or there is no password prompt to unlock with.
|
|
input-field = [
|
|
{
|
|
monitor = "DP-2";
|
|
size = "200, 50";
|
|
position = "0, -80";
|
|
rounding = 4;
|
|
dots_center = true;
|
|
dots_size = 0.33;
|
|
hide_input = false;
|
|
fade_on_empty = false;
|
|
font_family = "CaskaydiaCove Nerd Font Mono";
|
|
placeholder_text = ''<span foreground="##899296">Password...</span>'';
|
|
fail_text = ''<i>$FAIL <b>($ATTEMPTS)</b></i>'';
|
|
inherit inner_color;
|
|
outer_color = outline;
|
|
check_color = primary;
|
|
fail_color = error;
|
|
capslock_color = tertiary;
|
|
font_color = on_surface;
|
|
}
|
|
];
|
|
};
|
|
};
|
|
};
|
|
nixos.security.pam.services.hyprlock = { };
|
|
};
|
|
}
|