From 512b22c02198ceacbcf7ef953f02bbf09da508aa Mon Sep 17 00:00:00 2001 From: jmug Date: Thu, 5 Jun 2025 14:29:59 -0700 Subject: [PATCH] [Asahi] Add barebones hyprlock. Signed-off-by: jmug --- home-modules/hyprland.nix | 29 +++++++++++++++++++++++++++++ hosts/asahi/configuration.nix | 4 ++++ 2 files changed, 33 insertions(+) diff --git a/home-modules/hyprland.nix b/home-modules/hyprland.nix index 1dded61..8da7b35 100644 --- a/home-modules/hyprland.nix +++ b/home-modules/hyprland.nix @@ -2,6 +2,34 @@ home.packages = with pkgs; [ hyprshot ]; + programs.hyprlock = { + enable = true; + settings = { + background = { + monitor = ""; + color = "rgba(25, 20, 20, 1.0)"; + blur_passes = 2; + }; + input-field = { + monitor = ""; + size = "20%, 5%"; + outline_thickness = 3; + inner_color = "rgba(0, 0, 0, 0.0)"; # no fill + + outer_color = "rgba(33ccffee) rgba(00ff99ee) 45deg"; + check_color = "rgba(00ff99ee) rgba(ff6633ee) 120deg"; + fail_color = "rgba(ff6633ee) rgba(ff0066ee) 40deg"; + + font_color = "rgb(143, 143, 143)"; + fade_on_empty = false; + rounding = 15; + + position = "0, -20"; + halign = "center"; + valign = "center"; + }; + }; + }; # TODO: Move swaync to its own module if it ever gets more complex than just enalbement. services.swaync.enable = true; wayland.windowManager.hyprland.enable = true; @@ -121,6 +149,7 @@ "$mainMod SHIFT, P, exec, hyprshot -m region" "$mainMod, P, exec, hyprshot -m output" # "$mainMod, J, togglesplit," # dwindle + "$mainMod SHIFT, L, exec, hyprlock" # Move focus with mainMod + arrow keys "$mainMod, M, movefocus, l" diff --git a/hosts/asahi/configuration.nix b/hosts/asahi/configuration.nix index a6fc2b7..2f6667a 100644 --- a/hosts/asahi/configuration.nix +++ b/hosts/asahi/configuration.nix @@ -29,6 +29,8 @@ hardware.bluetooth.powerOnBoot = false; services.blueman.enable = true; + security.pam.services.hyprlock = {}; + nix.settings.experimental-features = [ "nix-command" "flakes" ]; # Allow unfree packages nixpkgs.config.allowUnfree = true; @@ -119,6 +121,8 @@ kitty # Theming palenight-theme + # Lock screen + hyprlock ]; fonts = {