1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-06 00:51:04 +01:00

uv: nullable package support

This commit is contained in:
Austin Horstman 2025-04-20 16:07:34 -05:00
parent 1d2d6b9568
commit b71ca26961

View file

@ -24,7 +24,7 @@ in
options.programs.uv = {
enable = mkEnableOption "uv";
package = mkPackageOption pkgs "uv" { };
package = mkPackageOption pkgs "uv" { nullable = true; };
settings = mkOption {
type = tomlFormat.type;
@ -47,7 +47,7 @@ in
};
config = lib.mkIf cfg.enable {
home.packages = [ cfg.package ];
home.packages = lib.mkIf (cfg.package != null) [ cfg.package ];
xdg.configFile."uv/uv.toml" = lib.mkIf (cfg.settings != { }) {
source = tomlFormat.generate "uv-config" cfg.settings;