1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-29 21:51:01 +01:00
home-manager/tests/modules/programs/uv/example-settings.nix
2025-04-20 14:32:29 -07:00

29 lines
695 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}"
'';
}