diff options
author | Nikolay Amiantov <ab@fmap.me> | 2016-08-19 13:14:07 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2016-08-20 03:21:05 +0300 |
commit | e3ab0826c2139253dc1717b8cff9aae599db2432 (patch) | |
tree | a2641a24e30f7b3fd5990523af1026d1442b13de /nixos/modules/config | |
parent | 4114cf9c6c184d72d51260caa6ad0e11984fee0b (diff) | |
download | nixpkgs-e3ab0826c2139253dc1717b8cff9aae599db2432.tar nixpkgs-e3ab0826c2139253dc1717b8cff9aae599db2432.tar.gz nixpkgs-e3ab0826c2139253dc1717b8cff9aae599db2432.tar.bz2 nixpkgs-e3ab0826c2139253dc1717b8cff9aae599db2432.tar.lz nixpkgs-e3ab0826c2139253dc1717b8cff9aae599db2432.tar.xz nixpkgs-e3ab0826c2139253dc1717b8cff9aae599db2432.tar.zst nixpkgs-e3ab0826c2139253dc1717b8cff9aae599db2432.zip |
fontconfig-ultimate: 2015-12-06 -> 2016-04-23
This removes our hardcoded presets which weren't updated for quite some time. Infinality now has new hardcoded presets in freetype, which can be overriden if desired with environment variables (as before). Accordingly, updated NixOS module to set the hardcoded preset. Additionally used a more "right" type for substitutions.
Diffstat (limited to 'nixos/modules/config')
-rw-r--r-- | nixos/modules/config/fonts/fontconfig-ultimate.nix | 47 |
1 files changed, 11 insertions, 36 deletions
diff --git a/nixos/modules/config/fonts/fontconfig-ultimate.nix b/nixos/modules/config/fonts/fontconfig-ultimate.nix index 3ea6e1fa53b..a3f52fbd919 100644 --- a/nixos/modules/config/fonts/fontconfig-ultimate.nix +++ b/nixos/modules/config/fonts/fontconfig-ultimate.nix @@ -79,16 +79,16 @@ let fcBool = x: if x then "<bool>true</bool>" else "<bool>false</bool>"; # fontconfig ultimate substitutions ${optionalString (cfg.substitutions != "none") '' - ln -s ${pkgs.fontconfig-ultimate.confd}/etc/fonts/presets/${cfg.substitutions}/*.conf \ + ln -s ${pkgs.fontconfig-ultimate}/etc/fonts/presets/${cfg.substitutions}/*.conf \ $support_folder - ln -s ${pkgs.fontconfig-ultimate.confd}/etc/fonts/presets/${cfg.substitutions}/*.conf \ + ln -s ${pkgs.fontconfig-ultimate}/etc/fonts/presets/${cfg.substitutions}/*.conf \ $latest_folder ''} # fontconfig ultimate various configuration files - ln -s ${pkgs.fontconfig-ultimate.confd}/etc/fonts/conf.d/*.conf \ + ln -s ${pkgs.fontconfig-ultimate}/etc/fonts/conf.d/*.conf \ $support_folder - ln -s ${pkgs.fontconfig-ultimate.confd}/etc/fonts/conf.d/*.conf \ + ln -s ${pkgs.fontconfig-ultimate}/etc/fonts/conf.d/*.conf \ $latest_folder ''; @@ -153,9 +153,7 @@ in }; substitutions = mkOption { - type = types.str // { - check = flip elem ["none" "free" "combi" "ms"]; - }; + type = types.nullOr (types.enum ["free" "combi" "ms"]); default = "free"; description = '' Font substitutions to replace common Type 1 fonts with nicer @@ -166,35 +164,12 @@ in ''; }; - rendering = mkOption { - type = types.attrs; - default = pkgs.fontconfig-ultimate.rendering.ultimate; + preset = mkOption { + type = types.enum ["ultimate1" "ultimate2" "ultimate3" "ultimate4" "ultimate5" "osx" "windowsxp"]; + default = "ultimate3"; description = '' - FreeType rendering settings presets. The default is - <literal>pkgs.fontconfig-ultimate.rendering.ultimate</literal>. - The other available styles are: - <literal>ultimate-lighter</literal>, - <literal>ultimate-darker</literal>, - <literal>ultimate-lightest</literal>, - <literal>ultimate-darkest</literal>, - <literal>default</literal> (the original Infinality default), - <literal>osx</literal>, - <literal>ipad</literal>, - <literal>ubuntu</literal>, - <literal>linux</literal>, - <literal>winxplight</literal>, - <literal>win7light</literal>, - <literal>winxp</literal>, - <literal>win7</literal>, - <literal>vanilla</literal>, - <literal>classic</literal>, - <literal>nudge</literal>, - <literal>push</literal>, - <literal>shove</literal>, - <literal>sharpened</literal>, - <literal>infinality</literal>. Any of the presets may be - customized by editing the attributes. To disable, set this option - to the empty attribute set <literal>{}</literal>. + FreeType rendering settings preset. Any of the presets may be + customized by setting environment variables. ''; }; }; @@ -206,7 +181,7 @@ in config = mkIf (config.fonts.fontconfig.enable && cfg.enable) { fonts.fontconfig.confPackages = [ confPkg ]; - environment.variables = cfg.rendering; + environment.variables."INFINALITY_FT" = cfg.preset; }; |