2.home-manager/tests/modules/programs/poetry/custom-settings.nix
Austin Horstman cba2f9ce95 treewide: reformat nixfmt-rfc-style
Reformat repository using new nixfmt-rfc-style.
2025-04-08 08:50:05 -07:00

26 lines
668 B
Nix

{ pkgs, ... }:
{
programs.poetry = {
enable = true;
settings = {
virtualenvs.create = true;
virtualenvs.in-project = true;
};
};
nmt.script =
let
expectedConfDir = if pkgs.stdenv.isDarwin then "Library/Application Support" else ".config";
expectedConfigPath = "home-files/${expectedConfDir}/pypoetry/config.toml";
expectedConfigContent = pkgs.writeText "poetry.config-custom.expected" ''
[virtualenvs]
create = true
in-project = true
'';
in
''
assertFileExists "${expectedConfigPath}"
assertFileContent "${expectedConfigPath}" "${expectedConfigContent}"
'';
}