Skip to content

Commit

Permalink
feat(home-manager): add support for hyprlock
Browse files Browse the repository at this point in the history
  • Loading branch information
42willow committed Sep 4, 2024
1 parent 874e668 commit 959f4bd
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .sources/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,18 @@
"url": "https://github.com/catppuccin/hyprland/archive/c388ac55563ddeea0afe9df79d4bfff0096b146b.tar.gz",
"hash": "0cxzxfgbqnkdnvn8nch4z4s7izzlm2jgciq1s8cjmypf8g7vy9n5"
},
"hyprlock": {
"type": "Git",
"repository": {
"type": "GitHub",
"owner": "catppuccin",
"repo": "hyprlock"
},
"branch": "main",
"revision": "480c46f1f3fa9dd175f8f9611c0d4378324378a7",
"url": "https://github.com/catppuccin/hyprlock/archive/480c46f1f3fa9dd175f8f9611c0d4378324378a7.tar.gz",
"hash": "13f02msykf4z3kxc8i7ai8jr94qj8c2scj4pjpfjvr2h1v532aqn"
},
"imv": {
"type": "Git",
"repository": {
Expand Down
1 change: 1 addition & 0 deletions modules/home-manager/all-modules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
./gtk.nix
./helix.nix
./hyprland.nix
./hyprlock.nix
./imv.nix
./k9s.nix
./kitty.nix
Expand Down
21 changes: 21 additions & 0 deletions modules/home-manager/hyprlock.nix
Original file line number Diff line number Diff line change
@@ -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";
};
};
}

0 comments on commit 959f4bd

Please sign in to comment.