From de68ba4ea246bf703247a48279a3841dc15cc495 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Fri, 30 Jun 2023 20:59:11 +0200 Subject: [PATCH] all style stuff in one file --- flake.nix | 2 +- nixos/components/gui/default.nix | 1 + nixos/components/gui/style.nix | 36 +++++++++++++++++++ nixos/components/gui/xorg/default.nix | 2 +- nixos/machines/dummy/configuration.nix | 2 +- nixos/machines/sternchen/configuration.nix | 2 +- nixos/modules/default.nix | 2 +- nixos/modules/system/font.nix | 42 ++++++++++------------ 8 files changed, 61 insertions(+), 28 deletions(-) create mode 100644 nixos/components/gui/style.nix diff --git a/flake.nix b/flake.nix index 2d4655c..ae1ada3 100644 --- a/flake.nix +++ b/flake.nix @@ -218,7 +218,7 @@ } ]; - homeManagerModules = {config, ... }: { + homeManagerModules = { config, ... }: { imports = [ home-manager.nixosModules.home-manager # stylix.nixosModules.stylix diff --git a/nixos/components/gui/default.nix b/nixos/components/gui/default.nix index bd31079..a37e39d 100644 --- a/nixos/components/gui/default.nix +++ b/nixos/components/gui/default.nix @@ -15,6 +15,7 @@ with lib; ./audio.nix ./kmonad.nix ./taskwarrior.nix + ./style.nix ]; config = mkIf config.components.gui.enable { diff --git a/nixos/components/gui/style.nix b/nixos/components/gui/style.nix new file mode 100644 index 0000000..c9a30e9 --- /dev/null +++ b/nixos/components/gui/style.nix @@ -0,0 +1,36 @@ +{ pkgs, config, lib, ... }: +with lib; +{ + options.components.gui.style.enable = mkOption { + type = lib.types.bool; + default = config.components.gui.enable; + }; + + config = mkIf (config.components.gui.style.enable) { + + fonts.fonts = with pkgs; [ + + corefonts + hasklig + inconsolata + source-code-pro + symbola + ubuntu_font_family + + # symbol fonts + # ------------ + nerdfonts + powerline-fonts + font-awesome + fira-code-symbols + jetbrains-mono + + # shell font + # ---------- + terminus_font + gohufont + + ]; + + }; +} diff --git a/nixos/components/gui/xorg/default.nix b/nixos/components/gui/xorg/default.nix index 18e9d20..d4a462a 100644 --- a/nixos/components/gui/xorg/default.nix +++ b/nixos/components/gui/xorg/default.nix @@ -6,7 +6,7 @@ with lib; config = mkIf config.components.gui.enable { - system.custom.fonts.enable = true; + # system.custom.fonts.enable = true; services.xserver = { diff --git a/nixos/machines/dummy/configuration.nix b/nixos/machines/dummy/configuration.nix index c472567..4fa8ab7 100644 --- a/nixos/machines/dummy/configuration.nix +++ b/nixos/machines/dummy/configuration.nix @@ -22,7 +22,7 @@ # ---- programs.custom.urxvt.fontSize = 17; programs.custom.xterm.fontSize = 17; - system.custom.fonts.dpi = 140; + # system.custom.fonts.dpi = 140; # allow un-free # ------------- diff --git a/nixos/machines/sternchen/configuration.nix b/nixos/machines/sternchen/configuration.nix index 83136db..04f40d5 100644 --- a/nixos/machines/sternchen/configuration.nix +++ b/nixos/machines/sternchen/configuration.nix @@ -51,7 +51,7 @@ # ----- programs.custom.urxvt.fontSize = 12; programs.custom.xterm.fontSize = 12; - system.custom.fonts.dpi = 100; + # system.custom.fonts.dpi = 100; # x11 # --- diff --git a/nixos/modules/default.nix b/nixos/modules/default.nix index 437f481..d28c3ac 100644 --- a/nixos/modules/default.nix +++ b/nixos/modules/default.nix @@ -34,7 +34,7 @@ #./system/audio.nix #./system/bluetooth.nix - ./system/font.nix + #./system/font.nix #./system/mainUser.nix ./system/on-failure.nix diff --git a/nixos/modules/system/font.nix b/nixos/modules/system/font.nix index c8d821a..ec308ad 100644 --- a/nixos/modules/system/font.nix +++ b/nixos/modules/system/font.nix @@ -46,29 +46,25 @@ in # defaultFonts = { monospace = [ "JetBrains Mono" ]; }; #}; - fonts = with pkgs; [ - - corefonts - hasklig - inconsolata - source-code-pro - symbola - ubuntu_font_family - - # symbol fonts - # ------------ - nerdfonts - powerline-fonts - font-awesome - fira-code-symbols - jetbrains-mono - - # shell font - # ---------- - terminus_font - gohufont - - ]; + # fonts = with pkgs; [ + # corefonts + # hasklig + # inconsolata + # source-code-pro + # symbola + # ubuntu_font_family + # # symbol fonts + # # ------------ + # nerdfonts + # powerline-fonts + # font-awesome + # fira-code-symbols + # jetbrains-mono + # # shell font + # # ---------- + # terminus_font + # gohufont + # ]; };