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 4a6e249
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .sources/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -482,4 +482,4 @@
}
},
"version": 3
}
}
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 4a6e249

Please sign in to comment.