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"; + }; + }; +} 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 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;