stylix/modules/avizo/hm.nix
Arseniy Chekanov cd9e19daa1
Add options availability checks (#100)
This allows using master on 22.11 and on NixOS without the HM module.
See #89 for design rationale.
2023-05-20 11:42:03 +01:00

25 lines
753 B
Nix

{pkgs, config, lib, options, ... }:
with config.lib.stylix.colors.withHashtag;
with config.stylix.fonts;
let
aviOpacity = lib.toHexString ((((builtins.ceil (config.stylix.opacity.popups * 100)) * 255) / 100));
in
{
options.stylix.targets.avizo.enable =
config.lib.stylix.mkEnableTarget "Avizo" true;
# Referenced https://github.com/stacyharper/base16-mako
config = lib.optionalAttrs (options.services ? avizo) (lib.mkIf config.stylix.targets.avizo.enable {
services.avizo = {
settings = {
default = {
background=base00 + aviOpacity;
border-color=base0D;
bar-fg-color=base05;
bar-bg-color=base00 + aviOpacity;
};
};
};
});
}