2024-09-19 17:44:40 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
2024-09-19 17:30:03 +02:00
|
|
|
let
|
2024-09-19 17:44:40 +02:00
|
|
|
cfg = config.krop.python;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.krop.python = {
|
|
|
|
enable = lib.mkOption {
|
|
|
|
type = lib.types.bool;
|
|
|
|
default = false;
|
|
|
|
example = true;
|
|
|
|
};
|
2024-10-18 16:17:05 +02:00
|
|
|
install-additional = lib.mkOption {
|
2024-09-19 17:44:40 +02:00
|
|
|
type = lib.types.bool;
|
|
|
|
default = true;
|
|
|
|
example = true;
|
2024-09-19 17:30:03 +02:00
|
|
|
};
|
2024-09-19 17:44:40 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
environment.systemPackages =
|
|
|
|
with pkgs;
|
|
|
|
[
|
|
|
|
python3
|
|
|
|
poetry
|
2024-09-26 15:53:30 +02:00
|
|
|
pre-commit
|
2024-10-11 09:26:18 +02:00
|
|
|
uv
|
2024-09-19 17:44:40 +02:00
|
|
|
]
|
2024-10-18 16:17:05 +02:00
|
|
|
++ lib.optionals cfg.install-additional [
|
|
|
|
python313
|
2024-09-19 17:44:40 +02:00
|
|
|
python311
|
|
|
|
python310
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|