nixdots/home/programs/terminal/coding/python/poetry.nix

28 lines
679 B
Nix
Raw Normal View History

2024-06-26 21:46:50 +00:00
{
lib,
osConfig,
...
}: let
inherit (lib) mkIf;
cfg = osConfig.myOptions.home-manager.programs.coding.python;
in {
config = mkIf cfg.enable {
programs.poetry = {
enable = true;
settings = {
virtualenvs = {
in-project = true;
2024-06-26 22:26:29 +00:00
# use python the version of python that's globally installed on the system
# and exists in PATH, instead of the python version poetry was installed
# with. Annoyingly, there's no good way to override the python version at
# which NixOS will built poetry here, so this is the next best thing.
2024-06-26 21:46:50 +00:00
prefer-active-python = true;
};
};
};
};
}