mirror of
https://github.com/nix-community/home-manager
synced 2024-11-30 06:59:45 +01:00
fontconfig: add module
This commit is contained in:
parent
3160c03843
commit
3f430627df
3 changed files with 57 additions and 0 deletions
|
@ -13,6 +13,7 @@ let
|
|||
modules = [
|
||||
./home-environment.nix
|
||||
./manual.nix
|
||||
./misc/fontconfig.nix
|
||||
./misc/gtk.nix
|
||||
./misc/news.nix
|
||||
./misc/pam.nix
|
||||
|
|
41
modules/misc/fontconfig.nix
Normal file
41
modules/misc/fontconfig.nix
Normal 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>
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -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.
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue