From 7ca7592c9722bd686d2db05e1fa488ff12704de9 Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Fri, 6 Sep 2024 04:32:07 +0200 Subject: [PATCH] add hyprlock --- flake.nix | 4 +++ home/laptop/hyprland/default.nix | 5 ++-- home/laptop/hyprland/hyprlock.nix | 42 +++++++++++++++++++++++++++++++ modules/greetd.nix | 1 + 4 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 home/laptop/hyprland/hyprlock.nix diff --git a/flake.nix b/flake.nix index f05e8d4..0465ad0 100644 --- a/flake.nix +++ b/flake.nix @@ -25,6 +25,10 @@ }; hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; hyprpaper.url = "github:hyprwm/hyprpaper"; + hyprlock = { + url = "github:hyprwm/hyprlock"; + inputs.nixpkgs.follows = "nixpkgs"; + }; hyprland-contrib = { url = "github:hyprwm/contrib"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/home/laptop/hyprland/default.nix b/home/laptop/hyprland/default.nix index 2a4a09c..d334569 100644 --- a/home/laptop/hyprland/default.nix +++ b/home/laptop/hyprland/default.nix @@ -1,12 +1,12 @@ { inputs, pkgs, ... }: { + imports = [./hyprlock.nix]; wayland.windowManager.hyprland = { enable = true; package = inputs.hyprland.packages.${pkgs.system}.hyprland; settings = { "$mod" = "SUPER"; - "$terminal" = "kitty"; - "$menu" = "fuzzel"; + "$terminal" = "kitty"; "$menu" = "fuzzel"; "monitor" = "eDP-1, 2256x1504@60, 0x0, 1.6"; input.touchpad.natural_scroll = true; gestures.workspace_swipe = true; @@ -50,6 +50,7 @@ }; programs.fuzzel.enable = true; + home.packages = with inputs.hyprland-contrib.packages.${pkgs.system}; [ grimblast ]; diff --git a/home/laptop/hyprland/hyprlock.nix b/home/laptop/hyprland/hyprlock.nix new file mode 100644 index 0000000..1d7ab9b --- /dev/null +++ b/home/laptop/hyprland/hyprlock.nix @@ -0,0 +1,42 @@ +{ inputs, pkgs, ... }: +{ + programs.hyprlock = { + enable = true; + package = inputs.hyprlock.packages.${pkgs.system}.default; + settings = + { + general = { + disable_loading_bar = true; + grace = 3; + hide_cursor = true; + no_fade_in = false; + }; + + background = [ + { + path = "screenshot"; + blur_passes = 3; + blur_size = 8; + } + ]; + + input-field = [ + { + size = "200, 50"; + position = "0, -80"; + monitor = ""; + dots_center = true; + fade_on_empty = false; + font_color = "rgb(202, 211, 245)"; + inner_color = "rgb(91, 96, 120)"; + outer_color = "rgb(24, 25, 38)"; + outline_thickness = 5; + placeholder_text = '' + Password... + ''; + shadow_passes = 2; + } + ]; + }; + }; +} diff --git a/modules/greetd.nix b/modules/greetd.nix index ae1316e..e330adb 100644 --- a/modules/greetd.nix +++ b/modules/greetd.nix @@ -39,5 +39,6 @@ in default_session = initial_session; }; }; + security.pam.services.hyprlock = {}; }; }