mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-06 09:01:04 +01:00
uv: nullable package support
This commit is contained in:
parent
1d2d6b9568
commit
b71ca26961
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue