From fe4a5a449157b25177f53c872c6170f979bb0d4f Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Wed, 19 Mar 2025 15:09:29 -0500 Subject: [PATCH] tex-fmt: add null package support Allows generating config without installing package. --- modules/programs/tex-fmt.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/programs/tex-fmt.nix b/modules/programs/tex-fmt.nix index 87dc8aa0e..94e3fe4bc 100644 --- a/modules/programs/tex-fmt.nix +++ b/modules/programs/tex-fmt.nix @@ -18,7 +18,7 @@ in { options.programs.tex-fmt = { enable = mkEnableOption "tex-fmt"; - package = mkPackageOption pkgs "tex-fmt" { }; + package = mkPackageOption pkgs "tex-fmt" { nullable = true; }; settings = mkOption { type = tomlFormat.type; @@ -43,7 +43,7 @@ in { }; config = lib.mkIf cfg.enable { - home.packages = [ cfg.package ]; + home.packages = lib.mkIf (cfg.package != null) [ cfg.package ]; home.file."${configDir}/tex-fmt/tex-fmt.toml" = lib.mkIf (cfg.settings != { }) {