nichts/modules/styling/stylix.nix

115 lines
2.8 KiB
Nix
Raw Normal View History

2024-05-22 14:29:45 +02:00
{
config,
2024-07-10 23:10:52 +02:00
inputs,
2024-05-22 14:29:45 +02:00
pkgs,
lib,
...
2024-05-26 02:36:36 +02:00
}: let
2024-07-10 22:10:54 +02:00
cfg = config.modules.theming.stylix;
inherit (config.modules.theming.stylix) scheme image;
inherit (config.modules.theming.stylix.cursor) size;
inherit (config.modules.theming.stylix.fontsizes) terminal popups applications;
2024-05-04 01:33:33 +02:00
in {
2024-07-10 23:10:52 +02:00
imports = [inputs.stylix.nixosModules.stylix];
2024-07-10 22:10:54 +02:00
options.modules.theming.stylix = {
2024-07-06 13:39:24 +02:00
enable = lib.mkEnableOption "stylix";
scheme = lib.mkOption {
description = " Color Scheme";
type = lib.types.str;
};
image = lib.mkOption {
description = "Image";
type = lib.types.path;
};
cursor = {
size = lib.mkOption {
description = "Cursor Size";
type = lib.types.int;
};
package = lib.mkOption {
description = "Cursor Package";
type = lib.types.package;
};
name = lib.mkOption {
description = "Cursor Name";
2024-07-15 09:27:55 +02:00
type = lib.types.str;
2024-07-06 13:39:24 +02:00
};
};
fontsizes = {
terminal = lib.mkOption {
description = "Terminal font size";
type = lib.types.int;
};
popups = lib.mkOption {
description = "Popup font size";
type = lib.types.int;
};
2024-07-07 13:23:38 +02:00
applications = lib.mkOption {
description = "Application font size";
type = lib.types.int;
};
2024-07-06 13:39:24 +02:00
};
};
2024-05-26 02:36:36 +02:00
config = lib.mkIf cfg.enable {
stylix = {
2024-07-06 13:39:24 +02:00
enable = true;
2024-07-07 13:23:38 +02:00
homeManagerIntegration.followSystem = true;
2024-07-06 13:39:24 +02:00
base16Scheme = scheme;
inherit image;
2024-05-26 02:36:36 +02:00
polarity = "dark";
autoEnable = true;
cursor = {
2024-07-06 13:39:24 +02:00
inherit size;
2024-05-26 02:36:36 +02:00
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic";
};
fonts = {
sizes = {
2024-07-07 13:23:38 +02:00
inherit terminal popups applications;
};
2024-05-26 02:36:36 +02:00
monospace = {
package =
pkgs.nerdfonts.override {fonts = ["JetBrainsMono" "ComicShannsMono"];};
# name = "JetBrainsMono";
name = "ComicShannsMono Nerd Font";
2024-05-14 00:18:53 +02:00
};
2024-07-07 13:23:38 +02:00
serif = config.stylix.fonts.monospace;
sansSerif = config.stylix.fonts.monospace;
# serif = {
#
# package = pkgs.noto-fonts;
# name = "Noto Serif";
# };
# sansSerif = {
# package = pkgs.lexend;
# name = "Lexend";
# };
2024-05-26 02:36:36 +02:00
emoji = {
package = pkgs.noto-fonts-emoji;
name = "Noto Color Emoji";
};
};
2024-05-26 02:36:36 +02:00
opacity = {
applications = 0.9;
popups = 0.9;
desktop = 0.9;
2024-07-10 23:10:52 +02:00
terminal = 1.0;
2024-05-26 02:36:36 +02:00
};
targets = {
console.enable = true;
fish.enable = true;
2024-06-01 19:31:05 +02:00
grub.enable = false;
2024-05-26 02:36:36 +02:00
grub.useImage = true;
gtk.enable = true;
lightdm.enable = true;
nixos-icons.enable = true;
nixvim.enable = true;
2024-07-07 13:23:38 +02:00
plymouth.enable = true;
2024-05-26 02:36:36 +02:00
plymouth.logoAnimated = true;
};
2024-05-04 01:33:33 +02:00
};
};
2024-05-04 01:33:33 +02:00
}