Add theme font, icon options
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -68,7 +68,11 @@
|
|||||||
gestures.workspace_swipe_distance = 600;
|
gestures.workspace_swipe_distance = 600;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.zsh.loginExtra = lib.mkBefore (builtins.readFile ./card.sh);
|
programs = {
|
||||||
|
zsh.loginExtra = lib.mkBefore (builtins.readFile ./card.sh);
|
||||||
|
# VSCode does not play well with fractional scaling
|
||||||
|
vscode.userSettings."window.zoomLevel" = (1.25 - 1) / 0.2;
|
||||||
|
};
|
||||||
|
|
||||||
theme = {
|
theme = {
|
||||||
cursor.size = 24;
|
cursor.size = 24;
|
||||||
|
@@ -236,6 +236,62 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
font = {
|
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 {
|
size = mkOption {
|
||||||
type = ints.positive;
|
type = ints.positive;
|
||||||
default = 12;
|
default = 12;
|
||||||
@@ -243,17 +299,34 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
cursor = {
|
icon = {
|
||||||
package = mkOption {
|
names = mkOption {
|
||||||
type = package;
|
type = listOf str;
|
||||||
default = pkgs.gnome.adwaita-icon-theme;
|
default = [ "Adwaita" ];
|
||||||
description = "The package providing the cursor theme.";
|
description = "The icon theme names.";
|
||||||
};
|
};
|
||||||
|
|
||||||
name = mkOption {
|
packages = mkOption {
|
||||||
type = str;
|
type = listOf package;
|
||||||
default = "Adwaita";
|
default = with pkgs; [
|
||||||
description = "The cursor name within the package.";
|
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 {
|
size = mkOption {
|
||||||
@@ -266,12 +339,29 @@ in
|
|||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home = {
|
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 = {
|
pointerCursor = {
|
||||||
inherit (cfg.cursor) package name size;
|
name = builtins.head cfg.cursor.names;
|
||||||
gtk.enable = true;
|
package = builtins.head cfg.cursor.packages;
|
||||||
x11.enable = true;
|
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;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@@ -60,4 +60,6 @@
|
|||||||
.label
|
.label
|
||||||
color: {{colors.on_surface.default.hex}}
|
color: {{colors.on_surface.default.hex}}
|
||||||
font-size: {{custom.font_size}}pt
|
font-size: {{custom.font_size}}pt
|
||||||
|
font-family: {{custom.font_sans_serif_all}}
|
||||||
|
font-weight: 500
|
||||||
margin: 0 .5 * {{custom.padding}}pt
|
margin: 0 .5 * {{custom.padding}}pt
|
||||||
|
@@ -13,12 +13,23 @@ in
|
|||||||
name = "adw-gtk3-dark";
|
name = "adw-gtk3-dark";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
font = {
|
||||||
|
name = builtins.head hmConfig.theme.font.sansSerif.names;
|
||||||
|
package = builtins.head hmConfig.theme.font.sansSerif.packages;
|
||||||
|
inherit (hmConfig.theme.font) size;
|
||||||
|
};
|
||||||
|
|
||||||
|
iconTheme = {
|
||||||
|
name = builtins.head hmConfig.theme.icon.names;
|
||||||
|
package = builtins.head hmConfig.theme.icon.packages;
|
||||||
|
};
|
||||||
|
|
||||||
gtk2.configLocation = "${hmConfig.xdg.configHome}/gtk-2.0/gtkrc";
|
gtk2.configLocation = "${hmConfig.xdg.configHome}/gtk-2.0/gtkrc";
|
||||||
gtk3.extraCss = "@import './theme.css';";
|
gtk3.extraCss = "@import './theme.css';";
|
||||||
gtk4.extraCss = "@import './theme.css';";
|
gtk4.extraCss = "@import './theme.css';";
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [ nixos-icons ];
|
home.pointerCursor.gtk.enable = true;
|
||||||
|
|
||||||
programs.matugen.settings.templates = {
|
programs.matugen.settings.templates = {
|
||||||
gtk3 = {
|
gtk3 = {
|
||||||
|
@@ -17,4 +17,6 @@ decoration {
|
|||||||
misc {
|
misc {
|
||||||
col.splash = rgb({{colors.on_surface.default.hex_stripped}})
|
col.splash = rgb({{colors.on_surface.default.hex_stripped}})
|
||||||
background_color = rgb({{colors.surface.default.hex_stripped}})
|
background_color = rgb({{colors.surface.default.hex_stripped}})
|
||||||
|
font_family = {{custom.font_sans_serif}}
|
||||||
|
splash_font_family = {{custom.font_monospace}}
|
||||||
}
|
}
|
||||||
|
@@ -8,6 +8,13 @@ in
|
|||||||
programs = {
|
programs = {
|
||||||
kitty = {
|
kitty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
font = {
|
||||||
|
name = builtins.head hmConfig.theme.font.monospace.names;
|
||||||
|
package = builtins.head hmConfig.theme.font.monospace.packages;
|
||||||
|
inherit (hmConfig.theme.font) size;
|
||||||
|
};
|
||||||
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
confirm_os_window_close 0
|
confirm_os_window_close 0
|
||||||
include theme.conf
|
include theme.conf
|
||||||
|
@@ -57,6 +57,14 @@ in
|
|||||||
opacity_shadow = builtins.toString (hmConfig.theme.opacity * .75);
|
opacity_shadow = builtins.toString (hmConfig.theme.opacity * .75);
|
||||||
opacity_shadow_hex = builtins.toString (percentageToHex (hmConfig.theme.opacity * .75));
|
opacity_shadow_hex = builtins.toString (percentageToHex (hmConfig.theme.opacity * .75));
|
||||||
font_size = builtins.toString hmConfig.theme.font.size;
|
font_size = builtins.toString hmConfig.theme.font.size;
|
||||||
|
font_sans_serif = builtins.head hmConfig.theme.font.sansSerif.names;
|
||||||
|
font_sans_serif_all = builtins.concatStringsSep ", " hmConfig.theme.font.sansSerif.names;
|
||||||
|
font_serif = builtins.head hmConfig.theme.font.serif.names;
|
||||||
|
font_serif_all = builtins.concatStringsSep ", " hmConfig.theme.font.serif.names;
|
||||||
|
font_monospace = builtins.head hmConfig.theme.font.monospace.names;
|
||||||
|
font_monospace_all = builtins.concatStringsSep ", " hmConfig.theme.font.monospace.names;
|
||||||
|
font_emoji = builtins.head hmConfig.theme.font.emoji.names;
|
||||||
|
font_emoji_all = builtins.concatStringsSep ", " hmConfig.theme.font.emoji.names;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -5,11 +5,14 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
home-manager.users.${user.name} = {
|
home-manager.users.${user.name} = {
|
||||||
home = {
|
programs.rofi = {
|
||||||
packages = with pkgs; [ rofi-wayland ];
|
enable = true;
|
||||||
persistence."/cache${user.home}".directories = [ "${hmConfig.xdg.relativeCacheHome}/rofi" ];
|
package = pkgs.rofi-wayland;
|
||||||
|
font = builtins.head hmConfig.theme.font.monospace.names;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home.persistence."/cache${user.home}".directories = [ "${hmConfig.xdg.relativeCacheHome}/rofi" ];
|
||||||
|
|
||||||
wayland.windowManager.hyprland.settings.bind = [
|
wayland.windowManager.hyprland.settings.bind = [
|
||||||
"$mod, r, exec, ${lib.meta.getExe pkgs.rofi-wayland} -cache-dir ${hmConfig.xdg.cacheHome}/rofi -show drun"
|
"$mod, r, exec, ${lib.meta.getExe pkgs.rofi-wayland} -cache-dir ${hmConfig.xdg.cacheHome}/rofi -show drun"
|
||||||
];
|
];
|
||||||
|
@@ -1,5 +1,8 @@
|
|||||||
{ user ? throw "user argument is required" }: { inputs, lib, pkgs, ... }:
|
{ user ? throw "user argument is required" }: { config, inputs, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
hmConfig = config.home-manager.users.${user.name};
|
||||||
|
in
|
||||||
{
|
{
|
||||||
home-manager.users.${user.name} = {
|
home-manager.users.${user.name} = {
|
||||||
programs.vscode = {
|
programs.vscode = {
|
||||||
@@ -10,6 +13,9 @@
|
|||||||
"editor.accessibilitySupport" = "off";
|
"editor.accessibilitySupport" = "off";
|
||||||
"editor.cursorBlinking" = "phase";
|
"editor.cursorBlinking" = "phase";
|
||||||
"editor.cursorSmoothCaretAnimation" = "on";
|
"editor.cursorSmoothCaretAnimation" = "on";
|
||||||
|
"editor.fontFamily" = builtins.concatStringsSep ", " hmConfig.theme.font.monospace.names;
|
||||||
|
"editor.fontLigatures" = true;
|
||||||
|
"editor.fontSize" = hmConfig.theme.font.size;
|
||||||
"editor.formatOnPaste" = true;
|
"editor.formatOnPaste" = true;
|
||||||
"editor.formatOnSave" = true;
|
"editor.formatOnSave" = true;
|
||||||
"editor.formatOnType" = true;
|
"editor.formatOnType" = true;
|
||||||
@@ -50,6 +56,8 @@
|
|||||||
"terminal.external.linuxExec" = "kitty";
|
"terminal.external.linuxExec" = "kitty";
|
||||||
"terminal.integrated.confirmOnExit" = "hasChildProcesses";
|
"terminal.integrated.confirmOnExit" = "hasChildProcesses";
|
||||||
"terminal.integrated.copyOnSelection" = true;
|
"terminal.integrated.copyOnSelection" = true;
|
||||||
|
"terminal.integrated.fontFamily" = builtins.concatStringsSep ", " hmConfig.theme.font.monospace.names;
|
||||||
|
"terminal.integrated.fontSize" = hmConfig.theme.font.size;
|
||||||
"window.autoDetectHighContrast" = false;
|
"window.autoDetectHighContrast" = false;
|
||||||
"window.menuBarVisibility" = "toggle";
|
"window.menuBarVisibility" = "toggle";
|
||||||
"workbench.editor.historyBasedLanguageDetection" = true;
|
"workbench.editor.historyBasedLanguageDetection" = true;
|
||||||
|
@@ -5,6 +5,7 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
home-manager.users.${user.name} = {
|
home-manager.users.${user.name} = {
|
||||||
|
home.pointerCursor.x11.enable = true;
|
||||||
xresources.path = "${hmConfig.xdg.configHome}/X11/xresources";
|
xresources.path = "${hmConfig.xdg.configHome}/X11/xresources";
|
||||||
};
|
};
|
||||||
}
|
}
|
@@ -22,7 +22,7 @@ in
|
|||||||
(import ../configs/swww { inherit user; })
|
(import ../configs/swww { inherit user; })
|
||||||
(import ../configs/kitty { inherit user; })
|
(import ../configs/kitty { inherit user; })
|
||||||
(import ../configs/gtk { inherit user; })
|
(import ../configs/gtk { inherit user; })
|
||||||
(import ../configs/x { inherit user; })
|
(import ../configs/x11 { inherit user; })
|
||||||
(import ../configs/vscode { inherit user; })
|
(import ../configs/vscode { inherit user; })
|
||||||
(import ../configs/qalculate { inherit user; })
|
(import ../configs/qalculate { inherit user; })
|
||||||
];
|
];
|
||||||
|
Reference in New Issue
Block a user