diff --git a/.sources/sources.json b/.sources/sources.json index 04ecf5d..c8a5634 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 0d30f02..5328e87 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 0000000..bf6506b --- /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"; + }; + }; +} diff --git a/tests/darwin.nix b/tests/darwin.nix index ca72f81..8e5b81c 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 diff --git a/tests/home.nix b/tests/home.nix index 004cece..ff4eebf 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;