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:
parent
70e951a968
commit
fe4a5a4491
1 changed files with 2 additions and 2 deletions
|
@ -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 != { }) {
|
||||
|
|
Loading…
Add table
Reference in a new issue