Enable fonts

This commit is contained in:
Natsu Kagami 2021-11-08 16:21:27 -05:00
parent 253bb50e93
commit 336f75bf50
Signed by: nki
GPG key ID: 7306B3D3C3AD6E51
3 changed files with 32 additions and 20 deletions

View file

@ -1,6 +1,7 @@
{ config, pkgs, ... }:
{
imports = [ ../modules/personal/fonts ];
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.systemPackages =
@ -28,6 +29,8 @@
# $ darwin-rebuild changelog
system.stateVersion = 4;
# Font configuration
users.users.nki = {
name = "nki";
home = "/Users/nki";

View file

@ -0,0 +1,27 @@
{ pkgs, lib, config, ... }:
with lib;
{
# Fonts
config.fonts = {
fonts = with pkgs; [
noto-fonts-emoji-blob-bin
ibm-plex
(nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
noto-fonts
noto-fonts-cjk
];
} // (if (strings.hasSuffix "linux" pkgs.system) then {
enableDefaultFonts = false;
fontconfig = {
defaultFonts = {
emoji = lib.mkBefore [ "Blobmoji" ];
serif = lib.mkBefore [ "IBM Plex Serif" ];
sansSerif = lib.mkBefore [ "IBM Plex Sans" ];
monospace = lib.mkBefore [ "IBM Plex Mono" ];
};
};
} else {}) // (if (strings.hasSuffix "darwin" pkgs.system) then {
enableFontDir = true;
} else {});
}

View file

@ -10,6 +10,8 @@
./hardware-configuration.nix
# secret management
./secrets
# Fonts
../modules/personal/fonts
];
# Use the systemd-boot EFI boot loader.
@ -134,26 +136,6 @@
VISUAL = "kak";
};
# Fonts
fonts = {
enableDefaultFonts = false;
fonts = with pkgs; [
noto-fonts-emoji-blob-bin
ibm-plex
(nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
noto-fonts
noto-fonts-cjk
];
fontconfig = {
defaultFonts = {
emoji = lib.mkBefore [ "Blobmoji" ];
serif = lib.mkBefore [ "IBM Plex Serif" ];
sansSerif = lib.mkBefore [ "IBM Plex Sans" ];
monospace = lib.mkBefore [ "IBM Plex Mono" ];
};
};
};
# Enable Desktop Environment.
services.xserver.displayManager = {
lightdm.enable = true;