nixos-config/nixos/system/settings/style.nix
2025-04-10 18:49:33 +02:00

134 lines
3.8 KiB
Nix

{
lib,
config,
pkgs,
pkgs-stable,
userSettings,
...
}: {
options = {
sys.style.enable = lib.mkEnableOption "Enable the Stylix theme manager.";
};
config = lib.mkIf config.sys.style.enable {
stylix = {
enable = true;
image = ../../../config/backgrounds/${userSettings.background};
base16Scheme =
if userSettings.theme == "catppuccin-mocha"
then {
base00 = "1e1e2e";
base01 = "181825"; # mantle
base02 = "313244"; # surface0
base03 = "45475a"; # surface1
base04 = "585b70"; # surface2
base05 = "cdd6f4"; # text
base06 = "f5e0dc"; # rosewater
base07 = "b4befe"; # lavender
base08 = "f38ba8"; # red
base09 = "fab387"; # peach
base0A = "f9e2af"; # yellow
base0B = "a6e3a1"; # green
base0C = "94e2d5"; # teal
base0D = "89b4fa"; # blue
base0E = "cba6f7"; # mauve
base0F = "f2cdcd"; # flamingo
}
else if userSettings.theme == "evangelion-blood"
then # List all possible themes: $ nix build nixpkgs#base16-schemes && ls result/share/themes
{
base00 = "000000"; # background
base01 = "300505"; # additional background
base02 = "804040"; # selected text, highlights
base03 = "a06000"; # unselected border
base04 = "d03030"; # discord name texts
base05 = "f00000"; # text
base06 = "b00505"; # main names in discord?
base07 = "f06060";
base08 = "f07070";
base09 = "f08080";
base0A = "f09090";
base0B = "c00000"; # title text
base0C = "c00090"; # links and main image things
base0D = "a03030"; # select border / special text
base0E = "f0d0d0";
base0F = "f0e0e0";
}
else if userSettings.theme == "tokyo-night-dark"
then {
base00 = "011d33";
base01 = "1a4a6e";
base02 = "1570a7";
base03 = "42a1d7";
base04 = "40a3dc";
base05 = "509ede";
base06 = "46a8d9";
base07 = "509ede";
base08 = "3f95e2";
base09 = "4296dc";
base0A = "3a97dd";
base0B = "3a97da";
base0C = "4797d2";
base0D = "3698d5";
base0E = "329bc8";
base0F = "3699d0";
}
else "${pkgs-stable.base16-schemes}/share/themes/${userSettings.theme}.yaml";
polarity = "dark";
autoEnable = true;
# Set the cursor theme.
cursor = {
package = pkgs-stable.bibata-cursors;
name = "Bibata-Modern-Ice";
size = 24;
};
fonts = {
sizes = {
desktop = 8;
applications = 10;
popups = 10;
terminal = 12;
};
serif = {
package = pkgs.nerd-fonts.ubuntu;
name = "Ubuntu NF";
};
sansSerif = {
package = pkgs.nerd-fonts.ubuntu;
name = "Ubuntu NF";
};
monospace = {
package = pkgs.nerd-fonts.jetbrains-mono;
name = "JetBrainsMono NF";
};
emoji = {
package = pkgs-stable.noto-fonts-emoji;
name = "Noto Color Emoji";
};
};
targets = {
plymouth = {
logo =
if userSettings.theme == "evangelion-blood"
then ../../../config/nerv.png
else if (userSettings.theme == "tokyo-night-dark")
then ../../../config/copeland.png
else ../../../config/mars.png;
logoAnimated =
if "evangelion-blood" == userSettings.theme || "tokyo-night-dark" == userSettings.theme
then false
else true;
};
};
};
};
}