Initial commit
This commit is contained in:
commit
a43b5a6a1a
12 changed files with 550 additions and 0 deletions
82
modules/font.nix
Normal file
82
modules/font.nix
Normal file
|
@ -0,0 +1,82 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
with lib;
|
||||
let cfg = config.voidcruiser.fontConfig;
|
||||
in {
|
||||
options.voidcruiser.fontConfig = {
|
||||
enable = mkEnableOption "Enable opinionated font configuration";
|
||||
joyPixels = mkEnableOption "Enables the JoyPixels font";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
fonts = {
|
||||
fontDir.enable = true;
|
||||
packages = with pkgs; [
|
||||
(nerdfonts.override { fonts = [ "FiraCode" "Iosevka" ]; })
|
||||
jetbrains-mono
|
||||
iosevka
|
||||
fira-code
|
||||
fira
|
||||
font-awesome
|
||||
liberation_ttf
|
||||
libertine
|
||||
libertinus
|
||||
vollkorn
|
||||
noto-fonts-emoji
|
||||
noto-fonts
|
||||
ipafont
|
||||
bqn386
|
||||
blackout
|
||||
prociono
|
||||
mplus-outline-fonts.githubRelease
|
||||
mononoki
|
||||
uiua386
|
||||
];
|
||||
fontconfig = {
|
||||
enable = true;
|
||||
includeUserConf = true;
|
||||
antialias = true;
|
||||
hinting.enable = true;
|
||||
|
||||
defaultFonts = {
|
||||
serif = [ "Vollkorn" "Fira Code" "IPAMincho" "Noto Color Emoji" ];
|
||||
sansSerif = [ "FiraSans" "Fira Code" "IPAGothic" "Noto Color Emoji" ];
|
||||
monospace = [ "Fira Code" "JetBrains Mono" "Iosevka" "IPAGothic" "Noto Color Emoji" ];
|
||||
emoji = [ "Noto Color Emoji" (mkIf cfg.joyPixels "JoyPixels") ];
|
||||
};
|
||||
|
||||
localConf = ''
|
||||
<fontconfig>
|
||||
|
||||
<match target="scan">
|
||||
<test name="family">
|
||||
<string>APL385 Unicode</string>
|
||||
</test>
|
||||
<edit name="spacing">
|
||||
<int>100</int>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<match target="scan">
|
||||
<test name="family">
|
||||
<string>BQN386 Unicode</string>
|
||||
</test>
|
||||
<edit name="spacing">
|
||||
<int>100</int>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<match target="scan">
|
||||
<test name="family">
|
||||
<string>Uiua386</string>
|
||||
</test>
|
||||
<edit name="spacing">
|
||||
<int>100</int>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
</fontconfig>
|
||||
'';
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue