1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-26 00:18:30 +02:00

fontconfig: add module

This commit is contained in:
Robert Helgesson 2017-10-09 18:37:57 +02:00
parent 3160c03843
commit 3f430627df
No known key found for this signature in database
GPG Key ID: C3DB11069E65DC86
3 changed files with 57 additions and 0 deletions

View File

@ -13,6 +13,7 @@ let
modules = [
./home-environment.nix
./manual.nix
./misc/fontconfig.nix
./misc/gtk.nix
./misc/news.nix
./misc/pam.nix

View File

@ -0,0 +1,41 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.fonts.fontconfig;
in
{
meta.maintainers = [ maintainers.rycee ];
options = {
fonts.fontconfig = {
enableProfileFonts = mkOption {
type = types.bool;
default = false;
example = true;
description = ''
Configure fontconfig to discover fonts installed through
<varname>home.packages</varname> and
<command>nix-env</command>.
</para><para>
Note, this is only necessary on non-NixOS systems.
'';
};
};
};
config = mkIf cfg.enableProfileFonts {
home.file.".config/fontconfig/conf.d/10-nix-profile-fonts.conf".text = ''
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<dir>~/.nix-profile/lib/X11/fonts</dir>
<dir>~/.nix-profile/share/fonts</dir>
</fontconfig>
'';
};
}

View File

@ -302,6 +302,21 @@ in
A new service is available: 'services.polybar'.
'';
}
{
time = "2017-10-09T16:38:34+00:00";
message = ''
A new module is available: 'fonts.fontconfig'.
In particular, the Boolean option
fonts.fontconfig.enableProfileFonts
was added for those who do not use NixOS and want to install
font packages using 'nix-env' or 'home.packages'. If you are
using NixOS then you do not need to enable this option.
'';
}
];
};
}