mirror of
https://github.com/ItsDrike/nixdots
synced 2025-06-30 16:30:42 +00:00
Actually enforce the roles
This commit is contained in:
parent
01e3567653
commit
dd00ed5f70
9 changed files with 238 additions and 193 deletions
|
@ -1,93 +1,99 @@
|
|||
{pkgs, ...}: {
|
||||
fonts = {
|
||||
enableDefaultPackages = false;
|
||||
{pkgs, lib, config, ...}: let
|
||||
inherit (lib) mkIf;
|
||||
deviceType = config.myOptions.device.roles.type;
|
||||
acceptedTypes = ["laptop" "desktop"];
|
||||
in {
|
||||
config = mkIf (builtins.elem deviceType acceptedTypes) {
|
||||
fonts = {
|
||||
enableDefaultPackages = false;
|
||||
|
||||
fontconfig = {
|
||||
defaultFonts = let
|
||||
common = [
|
||||
"Iosevka Nerd Font"
|
||||
"Symbols Nerd Font"
|
||||
"Noto Color Emoji"
|
||||
];
|
||||
in {
|
||||
monospace = [
|
||||
"Source Code Pro Medium"
|
||||
"Source Han Mono"
|
||||
]
|
||||
++ common;
|
||||
fontconfig = {
|
||||
defaultFonts = let
|
||||
common = [
|
||||
"Iosevka Nerd Font"
|
||||
"Symbols Nerd Font"
|
||||
"Noto Color Emoji"
|
||||
];
|
||||
in {
|
||||
monospace = [
|
||||
"Source Code Pro Medium"
|
||||
"Source Han Mono"
|
||||
]
|
||||
++ common;
|
||||
|
||||
sansSerif = [
|
||||
"Lexend"
|
||||
]
|
||||
++ common;
|
||||
sansSerif = [
|
||||
"Lexend"
|
||||
]
|
||||
++ common;
|
||||
|
||||
serif = [
|
||||
"Noto Serif"
|
||||
]
|
||||
++ common;
|
||||
serif = [
|
||||
"Noto Serif"
|
||||
]
|
||||
++ common;
|
||||
|
||||
emoji = [
|
||||
"Noto Color Emoji"
|
||||
]
|
||||
++ common;
|
||||
emoji = [
|
||||
"Noto Color Emoji"
|
||||
]
|
||||
++ common;
|
||||
};
|
||||
};
|
||||
|
||||
fontDir = {
|
||||
enable = true;
|
||||
decompressFonts = true;
|
||||
};
|
||||
|
||||
packages = with pkgs; [
|
||||
# programming fonts
|
||||
sarasa-gothic
|
||||
source-code-pro
|
||||
|
||||
# desktop fonts
|
||||
corefonts # MS fonts
|
||||
b612 # high legibility
|
||||
material-icons
|
||||
material-design-icons
|
||||
roboto
|
||||
work-sans
|
||||
comic-neue
|
||||
source-sans
|
||||
inter
|
||||
lato
|
||||
lexend
|
||||
dejavu_fonts
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
|
||||
# emojis
|
||||
noto-fonts-color-emoji
|
||||
twemoji-color-font
|
||||
openmoji-color
|
||||
openmoji-black
|
||||
font-awesome
|
||||
|
||||
# defaults worth keeping
|
||||
dejavu_fonts
|
||||
freefont_ttf
|
||||
gyre-fonts
|
||||
liberation_ttf
|
||||
unifont
|
||||
|
||||
# specific nerd fonts only
|
||||
# (installing all nerd fonts is slow and takes gigabytes)
|
||||
# see: <https://github.com/NixOS/nixpkgs/blob/master/pkgs/data/fonts/nerdfonts/shas.nix>
|
||||
# for all available fonts
|
||||
(nerdfonts.override {
|
||||
fonts = [
|
||||
"JetBrainsMono"
|
||||
"Iosevka"
|
||||
"NerdFontsSymbolsOnly"
|
||||
"FiraCode"
|
||||
"FiraMono"
|
||||
"Hack"
|
||||
"HeavyData"
|
||||
];
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
fontDir = {
|
||||
enable = true;
|
||||
decompressFonts = true;
|
||||
};
|
||||
|
||||
packages = with pkgs; [
|
||||
# programming fonts
|
||||
sarasa-gothic
|
||||
source-code-pro
|
||||
|
||||
# desktop fonts
|
||||
corefonts # MS fonts
|
||||
b612 # high legibility
|
||||
material-icons
|
||||
material-design-icons
|
||||
roboto
|
||||
work-sans
|
||||
comic-neue
|
||||
source-sans
|
||||
inter
|
||||
lato
|
||||
lexend
|
||||
dejavu_fonts
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
|
||||
# emojis
|
||||
noto-fonts-color-emoji
|
||||
twemoji-color-font
|
||||
openmoji-color
|
||||
openmoji-black
|
||||
font-awesome
|
||||
|
||||
# defaults worth keeping
|
||||
dejavu_fonts
|
||||
freefont_ttf
|
||||
gyre-fonts
|
||||
liberation_ttf
|
||||
unifont
|
||||
|
||||
# specific nerd fonts only
|
||||
# (installing all nerd fonts is slow and takes gigabytes)
|
||||
# see: <https://github.com/NixOS/nixpkgs/blob/master/pkgs/data/fonts/nerdfonts/shas.nix>
|
||||
# for all available fonts
|
||||
(nerdfonts.override {
|
||||
fonts = [
|
||||
"JetBrainsMono"
|
||||
"Iosevka"
|
||||
"NerdFontsSymbolsOnly"
|
||||
"FiraCode"
|
||||
"FiraMono"
|
||||
"Hack"
|
||||
"HeavyData"
|
||||
];
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue