system/settings/services/xserver.nix (view raw)
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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | {
config,
lib,
pkgs,
...
}:
with lib;
{
services.xserver = {
enable = true;
exportConfiguration = true;
};
console.useXkbConfig = true;
xdg.sounds.enable = false;
environment.systemPackages = with pkgs; [
xmodmap
xinit
xev
xdpyinfo
xclip
xfontsel
];
fonts = {
fontDir.enable = true;
enableDefaultPackages = false;
fontconfig = {
antialias = true;
useEmbeddedBitmaps = true;
defaultFonts = {
monospace = [ "Office Code Pro" ];
sansSerif = [ "Source Sans Pro" ];
serif = [ "Source Serif Pro" ];
};
localConf = ''
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match target="font">
<test name="weight" compare="more">
<const>medium</const>
</test>
<edit name="autohint" mode="assign">
<bool>false</bool>
</edit>
</match>
</fontconfig>
'';
};
packages =
with pkgs;
[
corefonts
font-misc-misc
font-cursor-misc
]
++ lib.optionals config.fonts.fontconfig.antialias [
cantarell-fonts
ibm-plex
noto-fonts-color-emoji
office-code-pro
source-code-pro
source-sans-pro
source-serif-pro
];
};
}
|