1
1
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-10-04 00:19:39 +03:00

fonts: remove fonts.fontDir.enable

As far as I can tell, this isn't required to get fonts to work on
NixOS, so we shouldn't require it on nix-darwin either, even if the
implementations are superficially similar.
This commit is contained in:
Emily 2023-08-03 02:11:40 +01:00
parent adf578e398
commit 7d4f867210
2 changed files with 4 additions and 13 deletions

View File

@ -6,7 +6,8 @@ in
{ {
imports = [ imports = [
(lib.mkRenamedOptionModule [ "fonts" "enableFontDir" ] [ "fonts" "fontDir" "enable" ]) (lib.mkRemovedOptionModule [ "fonts" "enableFontDir" ] "No nix-darwin equivalent to this NixOS option. This is not required to install fonts.")
(lib.mkRemovedOptionModule [ "fonts" "fontDir" "enable" ] "No nix-darwin equivalent to this NixOS option. This is not required to install fonts.")
(lib.mkRemovedOptionModule [ "fonts" "fonts" ] '' (lib.mkRemovedOptionModule [ "fonts" "fonts" ] ''
This option has been renamed to `fonts.packages' for consistency with NixOS. This option has been renamed to `fonts.packages' for consistency with NixOS.
@ -14,21 +15,12 @@ in
]; ];
options = { options = {
fonts.fontDir.enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
Whether to enable font management and install configured fonts to
{file}`/Library/Fonts/Nix Fonts`.
'';
};
fonts.packages = lib.mkOption { fonts.packages = lib.mkOption {
type = lib.types.listOf lib.types.path; type = lib.types.listOf lib.types.path;
default = [ ]; default = [ ];
example = lib.literalExpression "[ pkgs.dejavu_fonts ]"; example = lib.literalExpression "[ pkgs.dejavu_fonts ]";
description = '' description = ''
List of fonts to install. List of fonts to install into {file}`/Library/Fonts/Nix Fonts`.
''; '';
}; };
}; };
@ -52,7 +44,7 @@ in
) )
''; '';
system.activationScripts.fonts.text = lib.optionalString cfg.fontDir.enable '' system.activationScripts.fonts.text = ''
printf >&2 'setting up /Library/Fonts/Nix Fonts...\n' printf >&2 'setting up /Library/Fonts/Nix Fonts...\n'
# rsync uses the mtime + size of files to determine whether they # rsync uses the mtime + size of files to determine whether they

View File

@ -8,7 +8,6 @@ let
in in
{ {
fonts.fontDir.enable = true;
fonts.packages = [ font ]; fonts.packages = [ font ];
test = '' test = ''