1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00: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 = [
(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" ] ''
This option has been renamed to `fonts.packages' for consistency with NixOS.
@ -14,21 +15,12 @@ in
];
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 {
type = lib.types.listOf lib.types.path;
default = [ ];
example = lib.literalExpression "[ pkgs.dejavu_fonts ]";
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'
# rsync uses the mtime + size of files to determine whether they

View file

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