1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-03-31 04:04:32 +00:00

tex-fmt: add null package support

Allows generating config without installing package.
This commit is contained in:
Austin Horstman 2025-03-19 15:09:29 -05:00
parent 70e951a968
commit fe4a5a4491
No known key found for this signature in database

View file

@ -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 != { }) {