nixdots/home/programs/terminal/coding/python/poetry.nix
2024-06-27 00:26:29 +02:00

28 lines
679 B
Nix

{
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;
# 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.
prefer-active-python = true;
};
};
};
};
}