-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfont.nix
37 lines (35 loc) · 889 Bytes
/
font.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{ config, lib, pkgs, ... }:
with lib; {
options.font = {
name = mkOption {
type = types.str;
default = "Hack";
description = "Font name";
};
em = mkOption {
type = types.int;
default = 11;
description = "The size of the font in points";
};
px = mkOption {
type = types.int;
default = 16;
description = "The size of the font in pixels";
};
emstr = mkOption {
type = types.str;
default = "";
description = "Don't set";
};
};
config.font.emstr = "${config.font.name}FontMono ${toString config.font.em}";
config.home.packages = [
(pkgs.nerdfonts.override {fonts = [config.font.name];})
# Noto fonts used as backup for now
pkgs.noto-fonts
pkgs.noto-fonts-emoji
pkgs.noto-fonts-cjk-sans
pkgs.noto-fonts-extra
];
config.fonts.fontconfig.enable = true;
}