1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00
home-manager/tests/modules/programs/uv/example-settings.nix
Austin Horstman 373531850c tests/uv: fix expected config
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-06-22 12:47:26 -05:00

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