38 lines
598 B
Nix
38 lines
598 B
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.krop.python;
|
|
in
|
|
{
|
|
options.krop.python = {
|
|
enable = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = false;
|
|
example = true;
|
|
};
|
|
install-additional = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = true;
|
|
example = true;
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
environment.systemPackages =
|
|
with pkgs;
|
|
[
|
|
python3
|
|
poetry
|
|
pre-commit
|
|
uv-bin
|
|
]
|
|
++ lib.optionals cfg.install-additional [
|
|
python313
|
|
python311
|
|
];
|
|
};
|
|
}
|