diff options
author | Freya Murphy <freya@freyacat.org> | 2025-09-17 22:07:16 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2025-09-17 22:07:16 -0400 |
commit | 68d03fe362b7e0df11662d8d6a1e01eac0bfae77 (patch) | |
tree | a76abd05f662f73b4083ddb0d8bf0d72c29e5a74 /home/apps/hyprlock.nix | |
parent | update commits (diff) | |
download | dotfiles-nix-68d03fe362b7e0df11662d8d6a1e01eac0bfae77.tar.gz dotfiles-nix-68d03fe362b7e0df11662d8d6a1e01eac0bfae77.tar.bz2 dotfiles-nix-68d03fe362b7e0df11662d8d6a1e01eac0bfae77.zip |
refactor: remove modules folder, fully split home and system modules
Diffstat (limited to 'home/apps/hyprlock.nix')
-rw-r--r-- | home/apps/hyprlock.nix | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/home/apps/hyprlock.nix b/home/apps/hyprlock.nix new file mode 100644 index 0000000..6a0119f --- /dev/null +++ b/home/apps/hyprlock.nix @@ -0,0 +1,104 @@ +{ + config, + lib, + ... +}: let + text = "rgb(${config.theme.colors.text})"; + base = "rgb(${config.theme.colors.base})"; + error = "rgb(${config.theme.colors.error})"; + trans = "rgba(0,0,0,0)"; + + inherit (lib) mkIf optionals; + cfg = config.apps.hyprlock; +in { + config = mkIf cfg.enable { + default.lockScreen = lib.mkDefault "hyprlock"; + + programs.hyprlock = { + enable = true; + + settings = { + auth = { + "pam:enabled" = true; + "fingerprint:enabled" = config.fingerprint; + }; + + animations = { + enabled = true; + animation = [ + "fadeIn, 0" + "fadeOut, 0" + ]; + }; + + background = { + path = config.theme.lockscreen; + color = base; + blur_passes = 0; + blur_size = 2; + noise = 0; + contrast = 0; + brightness = 0; + vibrancy = 0; + vibrancy_darkness = 0.0; + }; + + # Password Input + input-field = { + size = "300, 50"; + outline_thickness = 0; + dots_size = 0.25; + dots_spacing = 0.55; + dots_center = true; + dots_rounding = -1; + outer_color = trans; + inner_color = trans; + font_color = text; + fade_on_empty = false; + placeholder_text = + "Enter Password" + + ( + if config.fingerprint + then " or Touch Fingerprint" + else "" + ); + hide_input = false; + check_color = error; + fail_color = error; + capslock_color = trans; + numlock_color = trans; + bothlock_color = trans; + invert_numlock = false; + swap_font_color = false; + font_family = config.theme.font.regular; + position = "0, 50"; + halign = "center"; + valign = "bottom"; + }; + + label = [ + # Date + { + text = "cmd[update:1000] echo \"$(date +\"%A, %B %d\")\""; + color = text; + font_size = 20; + font_family = config.theme.font.header; + position = "0, -100"; + halign = "center"; + valign = "top"; + } + # Clock + { + text = "cmd[update:1000] echo \"$(date +\"%k:%M:%S\")\""; + color = text; + font_size = 90; + font_family = config.theme.font.header; + position = "0, -130"; + halign = "center"; + valign = "top"; + } + ]; + }; + }; + }; +} |