From 0c769c8d80254e05642962f5ef78ecdaa1ac0152 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 3 Aug 2023 02:11:40 +0100 Subject: [PATCH] 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. --- modules/fonts/default.nix | 15 ++++----------- tests/fonts.nix | 1 - 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/modules/fonts/default.nix b/modules/fonts/default.nix index 1da6cb9bc..dbdf8f7ef 100644 --- a/modules/fonts/default.nix +++ b/modules/fonts/default.nix @@ -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,20 +15,12 @@ in ]; options = { - fonts.fontDir.enable = lib.mkOption { - default = false; - description = lib.mdDoc '' - 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 = lib.mdDoc '' - List of fonts to install. + List of fonts to install into {file}`/Library/Fonts/Nix Fonts`. ''; }; }; @@ -51,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 diff --git a/tests/fonts.nix b/tests/fonts.nix index 57d61dc7d..d60979c57 100644 --- a/tests/fonts.nix +++ b/tests/fonts.nix @@ -8,7 +8,6 @@ let in { - fonts.fontDir.enable = true; fonts.packages = [ font ]; test = ''