From 4a6e24960a3600b7ab79f304d86827e7ea59b69b Mon Sep 17 00:00:00 2001 From: willow <42willow@pm.me> Date: Wed, 4 Sep 2024 21:35:29 +1000 Subject: [PATCH 1/3] feat(home-manager): add support for hyprlock --- .sources/sources.json | 2 +- modules/home-manager/all-modules.nix | 1 + modules/home-manager/hyprlock.nix | 21 +++++++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 modules/home-manager/hyprlock.nix diff --git a/.sources/sources.json b/.sources/sources.json index 04ecf5dc..c8a5634f 100644 --- a/.sources/sources.json +++ b/.sources/sources.json @@ -482,4 +482,4 @@ } }, "version": 3 -} \ No newline at end of file +} diff --git a/modules/home-manager/all-modules.nix b/modules/home-manager/all-modules.nix index 0d30f02b..5328e876 100644 --- a/modules/home-manager/all-modules.nix +++ b/modules/home-manager/all-modules.nix @@ -19,6 +19,7 @@ ./gtk.nix ./helix.nix ./hyprland.nix + ./hyprlock.nix ./imv.nix ./k9s.nix ./kitty.nix diff --git a/modules/home-manager/hyprlock.nix b/modules/home-manager/hyprlock.nix new file mode 100644 index 00000000..bf6506bd --- /dev/null +++ b/modules/home-manager/hyprlock.nix @@ -0,0 +1,21 @@ +{ config, lib, ... }: +let + inherit (config.catppuccin) sources; + cfg = config.programs.hyprlock.catppuccin; + enable = cfg.enable && config.programs.hyprlock.enable; +in +{ + options.programs.hyprlock.catppuccin = + lib.ctp.mkCatppuccinOpt { name = "hyprlock"; } + // { + accent = lib.ctp.mkAccentOpt "hyprlock"; + }; + + config = lib.mkIf enable { + programs.hyprlock.settings = { + source = [ "${sources.hyprland}/themes/${cfg.flavor}.conf" ]; + "$accent" = "\$${cfg.accent}"; + "$accentAlpha" = "\$${cfg.accent}Alpha"; + }; + }; +} From 30eef55927839a6da2a49bfc68040e04c9c141b2 Mon Sep 17 00:00:00 2001 From: willow <42willow@pm.me> Date: Thu, 5 Sep 2024 16:32:36 +1000 Subject: [PATCH 2/3] feat(hyprlock): enable in tests --- tests/home.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/home.nix b/tests/home.nix index 004ceced..ff4eebfe 100644 --- a/tests/home.nix +++ b/tests/home.nix @@ -36,6 +36,7 @@ # listing explicitly so we know it's tested glamour.catppuccin.enable = true; helix.enable = true; + hyprlock.enable = true; imv.enable = true; k9s.enable = true; kitty.enable = true; From 0ee7b2b82e28aa23839e42a5c5b8dd82ccafd59d Mon Sep 17 00:00:00 2001 From: willow <42willow@pm.me> Date: Thu, 5 Sep 2024 22:29:19 +1000 Subject: [PATCH 3/3] refactor(hyprlock): disable darwin tests --- tests/darwin.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/darwin.nix b/tests/darwin.nix index ca72f813..8e5b81cc 100644 --- a/tests/darwin.nix +++ b/tests/darwin.nix @@ -19,6 +19,7 @@ cava.enable = lib.mkForce false; # NOTE: this may actually work on darwin, but the package is currently not supported foot.enable = lib.mkForce false; fuzzel.enable = lib.mkForce false; + hyprlock.enable = lib.mkForce false; imv.enable = lib.mkForce false; mpv.enable = lib.mkForce false; # NOTE: same as cava, but `mpv` fails to build currently rio.enable = lib.mkForce false; # marked as broken