11.stylix/modules/glance/hm.nix
Louis Thevenet bc38629511
glance: init nixos module (#1187)
Link: https://github.com/danth/stylix/pull/1187

Reviewed-by: awwpotato <awwpotato@voidq.com>
Tested-by: awwpotato <awwpotato@voidq.com>
2025-05-01 21:04:50 -07:00

21 lines
631 B
Nix

{ config, lib, ... }:
let
rgb-to-hsl = import ./rgb-to-hsl.nix { inherit lib config; };
in
{
options.stylix.targets.glance.enable =
config.lib.stylix.mkEnableTarget "Glance" true;
config =
lib.mkIf (config.stylix.enable && config.stylix.targets.glance.enable)
{
services.glance.settings.theme = {
light = config.stylix.polarity == "light";
contrast-multiplier = 1.0;
background-color = rgb-to-hsl "base00";
primary-color = rgb-to-hsl "base05";
positive-color = rgb-to-hsl "base01";
negative-color = rgb-to-hsl "base04";
};
};
}