wew lad
This commit is contained in:
commit
d78da97be7
35 changed files with 6762 additions and 0 deletions
64
home-manager/modules/fonts.nix
Normal file
64
home-manager/modules/fonts.nix
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.fonts;
|
||||
in
|
||||
{
|
||||
options.fonts = {
|
||||
enable = mkEnableOption "Enable automatic fonts";
|
||||
|
||||
favFont = mkOption {
|
||||
description = "Your favourite font";
|
||||
default = { };
|
||||
type = types.submodule {
|
||||
options = {
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
default = "Monoid Nerd Font Mono";
|
||||
description = "Name of your font";
|
||||
};
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.nerdfonts.override { fonts = [ "Hack" "Monoid" "Hermit" ]; };
|
||||
description = "Package for your font";
|
||||
};
|
||||
size = mkOption {
|
||||
type = types.int;
|
||||
default = 10;
|
||||
description = "Size for your font";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config =
|
||||
mkIf cfg.enable {
|
||||
home.packages = [ cfg.favFont.package ];
|
||||
|
||||
programs.vscode.userSettings = {
|
||||
"editor.fontFamily" = "\"${cfg.favFont.name}\"";
|
||||
};
|
||||
|
||||
gtk.font = {
|
||||
package = cfg.favFont.package;
|
||||
name = "${cfg.favFont.name} ${toString cfg.favFont.size}";
|
||||
};
|
||||
|
||||
programs.kitty.settings = {
|
||||
font_family = cfg.favFont.name;
|
||||
font_size = cfg.favFont.size;
|
||||
};
|
||||
|
||||
programs.rofi.font = "${cfg.favFont.name} ${toString cfg.favFont.size}";
|
||||
|
||||
programs.mako.font = "${cfg.favFont.name} ${toString cfg.favFont.size}";
|
||||
|
||||
wayland.windowManager.sway.config.fonts = [ cfg.favFont.name ];
|
||||
xsession.windowManager.i3.config.fonts = [ cfg.favFont.name ];
|
||||
|
||||
programs.neovim.extraConfig = ''
|
||||
set guifont=${lib.replaceChars [ " " ] [ "\\ " ] cfg.favFont.name}:h${toString (cfg.favFont.size + 0.5)}
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue