1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-03-28 02:37:05 +00:00
home-manager/tests/modules/programs/uv/example-settings.nix
2024-11-14 18:47:56 +01:00

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