11.stylix/modules/glance/nixos.nix
NAHO 16df6b8448
treewide: rename mkTarget's configElements and extraOptions options
Rename mkTarget's 'configElements' argument to 'config' and
'extraOptions' to 'options' to provide a more transparent interface with
the underlying Nixpkgs module system.
2025-12-10 14:48:20 +01:00

29 lines
634 B
Nix

{ mkTarget, lib, ... }:
mkTarget {
name = "glance";
humanName = "Glance";
config = [
(
{ polarity }:
{
services.glance.settings.theme.light = polarity == "light";
}
)
(
{ colors }:
let
rgb-to-hsl = import ./rgb-to-hsl.nix { inherit lib colors; };
in
{
services.glance.settings.theme = {
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";
};
}
)
];
}