From 37a9724d63eb25c6306e9da60ed452585f98adaa Mon Sep 17 00:00:00 2001 From: Nydragon Date: Tue, 25 Jun 2024 22:00:40 +0200 Subject: [PATCH] feat(hyprlock): enable and configure --- home/hyprland/default.nix | 5 +++-- home/hyprlock/default.nix | 35 +++++++++++++++++++++++++++++++++++ hosts/brontes/home.nix | 36 ++++++++++++++++++++++++++++++++++-- 3 files changed, 72 insertions(+), 4 deletions(-) create mode 100644 home/hyprlock/default.nix diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix index 2bd9ea1..e5fba08 100644 --- a/home/hyprland/default.nix +++ b/home/hyprland/default.nix @@ -27,8 +27,8 @@ lib.mkIf osConfig.programs.hyprland.enable { ]; general = { - gaps_in = 5; - gaps_out = 20; + gaps_in = 3; + gaps_out = 10; border_size = 2; @@ -111,6 +111,7 @@ lib.mkIf osConfig.programs.hyprland.enable { #"$mod, S, exec, rofi -show clipboard -show-icons" "$mod SHIFT, Q, killactive," "$mod SHIFT, P, exec, rofi -show p -modi p:rofi-power-menu" + "$mod, P, exec, cliphist wipe & ${pkgs.hyprlock}/bin/hyprlock" "$mod SHIFT, C, exec, hyprctl reload" "$mod, left, movefocus, l" "$mod, right, movefocus, r" diff --git a/home/hyprlock/default.nix b/home/hyprlock/default.nix new file mode 100644 index 0000000..f045a51 --- /dev/null +++ b/home/hyprlock/default.nix @@ -0,0 +1,35 @@ +{ + programs.hyprlock = { + enable = true; + settings = { + general = { + 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/hosts/brontes/home.nix b/hosts/brontes/home.nix index 8effb73..0420628 100644 --- a/hosts/brontes/home.nix +++ b/hosts/brontes/home.nix @@ -1,12 +1,11 @@ { pkgs, - stateVersion, username, config, ... }: { - home-manager.users.${username} = { + home-manager.users.${username} = rec { imports = [ ../../home/firefox ../../home/fish @@ -17,18 +16,51 @@ ../../home/sway/swaync ../../home/sway/waybar ../../home/hyprland + ../../home/hyprlock ]; programs.direnv = { enable = true; nix-direnv.enable = true; }; + dconf = { + enable = true; + settings."org/gnome/desktop/interface".color-scheme = "prefer-dark"; + }; + gtk = { + enable = true; + theme = { + name = "Catppuccin-Frappe-Compact-Lavender-Dark"; + package = pkgs.catppuccin-gtk.override { + accents = [ "lavender" ]; + size = "compact"; + variant = "frappe"; + }; + }; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.catppuccin-papirus-folders.override { + accent = "lavender"; + flavor = "frappe"; + }; + }; + cursorTheme = with home.pointerCursor; { + inherit name package size; + }; + }; services.blueman-applet.enable = true; home = { stateVersion = config.system.stateVersion; inherit username; + pointerCursor = { + gtk.enable = true; + x11.enable = true; + name = "catppuccin-frappe-lavender-cursors"; + package = pkgs.catppuccin-cursors.frappeLavender; + size = 32; + }; packages = let