106 lines
2.2 KiB
Nix
106 lines
2.2 KiB
Nix
{
|
|
pkgs,
|
|
config,
|
|
inputs,
|
|
lib,
|
|
...
|
|
}:
|
|
with lib; let
|
|
cfg = config.universe.theme.stylix;
|
|
in {
|
|
imports = [
|
|
inputs.stylix.homeManagerModules.stylix
|
|
];
|
|
|
|
options.universe.theme.stylix = {
|
|
useLutgen = mkEnableOption "lutgen";
|
|
|
|
wallpapers = mkOption {
|
|
type = types.path;
|
|
};
|
|
|
|
base16Scheme = mkOption {
|
|
type = types.str;
|
|
default = config.stylix.generated.palette;
|
|
};
|
|
};
|
|
|
|
config = {
|
|
stylix = {
|
|
enable = true;
|
|
base16Scheme = cfg.base16Scheme;
|
|
image =
|
|
if cfg.useLutgen
|
|
then let
|
|
level = 10;
|
|
lum = 1.0;
|
|
preserve = false;
|
|
in
|
|
pkgs.runCommand "output.png" {} ''
|
|
${pkgs.lutgen}/bin/lutgen apply ${cfg.wallpapers} -l ${builtins.toString level} -L ${builtins.toString lum} ${
|
|
if preserve == true
|
|
then "-P"
|
|
else ""
|
|
} -o $out -- ${
|
|
builtins.concatStringsSep " " (with config.lib.stylix.colors; [
|
|
base00
|
|
base01
|
|
base02
|
|
base03
|
|
base04
|
|
base05
|
|
base06
|
|
base07
|
|
base08
|
|
base09
|
|
base0A
|
|
base0B
|
|
base0C
|
|
base0D
|
|
base0E
|
|
base0F
|
|
])
|
|
}
|
|
''
|
|
else cfg.wallpapers;
|
|
|
|
polarity = "dark";
|
|
|
|
cursor = {
|
|
package = pkgs.bibata-cursors;
|
|
name = "Bibata-Modern-Classic";
|
|
size = 24;
|
|
};
|
|
|
|
fonts = {
|
|
serif = {
|
|
name = "Cantarell";
|
|
package = pkgs.cantarell-fonts;
|
|
};
|
|
monospace = {
|
|
name = "CaskaydiaCove Nerd Font Mono";
|
|
package = pkgs.nerd-fonts.jetbrains-mono;
|
|
};
|
|
sansSerif = config.stylix.fonts.serif;
|
|
emoji = config.stylix.fonts.serif;
|
|
|
|
sizes = {
|
|
desktop = 12;
|
|
applications = 12;
|
|
popups = 12;
|
|
terminal = 16;
|
|
};
|
|
};
|
|
|
|
opacity = {terminal = 0.65;};
|
|
|
|
targets = {
|
|
kde.enable = false;
|
|
waybar.enable = false;
|
|
vesktop.enable = true;
|
|
btop.enable = true;
|
|
};
|
|
};
|
|
};
|
|
}
|