Add theme font, icon options
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -236,6 +236,62 @@ in
|
||||
};
|
||||
|
||||
font = {
|
||||
sansSerif = {
|
||||
names = mkOption {
|
||||
type = listOf str;
|
||||
default = [ "Roboto" ];
|
||||
description = "The sans serif font families.";
|
||||
};
|
||||
|
||||
packages = mkOption {
|
||||
type = listOf package;
|
||||
default = with pkgs; [ roboto ];
|
||||
description = "The sans serif font packages.";
|
||||
};
|
||||
};
|
||||
|
||||
serif = {
|
||||
names = mkOption {
|
||||
type = listOf str;
|
||||
default = [ "Roboto Serif" ];
|
||||
description = "The serif font families.";
|
||||
};
|
||||
|
||||
packages = mkOption {
|
||||
type = listOf package;
|
||||
default = with pkgs; [ roboto-serif ];
|
||||
description = "The serif font packages.";
|
||||
};
|
||||
};
|
||||
|
||||
monospace = {
|
||||
names = mkOption {
|
||||
type = listOf str;
|
||||
default = [ "JetBrainsMono Nerd Font" ];
|
||||
description = "The monospace font families.";
|
||||
};
|
||||
|
||||
packages = mkOption {
|
||||
type = listOf package;
|
||||
default = with pkgs; [ (nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) ];
|
||||
description = "The monospace font packages.";
|
||||
};
|
||||
};
|
||||
|
||||
emoji = {
|
||||
names = mkOption {
|
||||
type = listOf str;
|
||||
default = [ "Noto Emoji" "Font Awesome" ];
|
||||
description = "The emoji font families.";
|
||||
};
|
||||
|
||||
packages = mkOption {
|
||||
type = listOf package;
|
||||
default = with pkgs; [ noto-fonts-color-emoji font-awesome ];
|
||||
description = "The emoji font packages.";
|
||||
};
|
||||
};
|
||||
|
||||
size = mkOption {
|
||||
type = ints.positive;
|
||||
default = 12;
|
||||
@@ -243,17 +299,34 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
cursor = {
|
||||
package = mkOption {
|
||||
type = package;
|
||||
default = pkgs.gnome.adwaita-icon-theme;
|
||||
description = "The package providing the cursor theme.";
|
||||
icon = {
|
||||
names = mkOption {
|
||||
type = listOf str;
|
||||
default = [ "Adwaita" ];
|
||||
description = "The icon theme names.";
|
||||
};
|
||||
|
||||
name = mkOption {
|
||||
type = str;
|
||||
default = "Adwaita";
|
||||
description = "The cursor name within the package.";
|
||||
packages = mkOption {
|
||||
type = listOf package;
|
||||
default = with pkgs; [
|
||||
gnome.adwaita-icon-theme
|
||||
nixos-icons
|
||||
];
|
||||
description = "The icon theme packages.";
|
||||
};
|
||||
};
|
||||
|
||||
cursor = {
|
||||
names = mkOption {
|
||||
type = listOf str;
|
||||
default = [ "Adwaita" ];
|
||||
description = "The cursor names.";
|
||||
};
|
||||
|
||||
packages = mkOption {
|
||||
type = listOf package;
|
||||
default = with pkgs; [ gnome.adwaita-icon-theme ];
|
||||
description = "The cursor theme packages.";
|
||||
};
|
||||
|
||||
size = mkOption {
|
||||
@@ -266,12 +339,29 @@ in
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home = {
|
||||
packages = [ cfg.pkg ];
|
||||
packages =
|
||||
[ cfg.pkg ] ++
|
||||
cfg.font.sansSerif.packages ++
|
||||
cfg.font.serif.packages ++
|
||||
cfg.font.monospace.packages ++
|
||||
cfg.font.emoji.packages ++
|
||||
cfg.icon.packages ++
|
||||
cfg.cursor.packages;
|
||||
|
||||
pointerCursor = {
|
||||
inherit (cfg.cursor) package name size;
|
||||
gtk.enable = true;
|
||||
x11.enable = true;
|
||||
name = builtins.head cfg.cursor.names;
|
||||
package = builtins.head cfg.cursor.packages;
|
||||
inherit (cfg.cursor) size;
|
||||
};
|
||||
};
|
||||
|
||||
fonts.fontconfig = {
|
||||
enable = true;
|
||||
defaultFonts = {
|
||||
sansSerif = cfg.font.sansSerif.names;
|
||||
serif = cfg.font.serif.names;
|
||||
monospace = cfg.font.monospace.names;
|
||||
emoji = cfg.font.emoji.names;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user