mirror of
https://github.com/nix-community/home-manager.git
synced 2025-03-28 02:37:05 +00:00
27 lines
665 B
Nix
27 lines
665 B
Nix
{ pkgs, ... }:
|
|
|
|
{
|
|
programs.uv = {
|
|
enable = true;
|
|
settings = {
|
|
python-downloads = "never";
|
|
python-preference = "only-system";
|
|
pip.index-url = "https://test.pypi.org/simple";
|
|
};
|
|
};
|
|
|
|
test.stubs.uv = { };
|
|
|
|
nmt.script = let
|
|
expectedConfigPath = "home-files/.config/uv/uv.toml";
|
|
expectedConfigContent = pkgs.writeText "uv.config-custom.expected" ''
|
|
python-downloads = "never"
|
|
python-preference = "only-system"
|
|
[pip]
|
|
index-url = "https://test.pypi.org/simple"
|
|
'';
|
|
in ''
|
|
assertFileExists "${expectedConfigPath}"
|
|
assertFileContent "${expectedConfigPath}" "${expectedConfigContent}"
|
|
'';
|
|
}
|