Merge remote-tracking branch 'refs/remotes/origin/nixos' into nixos

This commit is contained in:
Moritz Böhme 2024-06-19 09:31:45 +02:00
commit 053f516175
No known key found for this signature in database
GPG key ID: 970C6E89EB0547A9
16 changed files with 330 additions and 244 deletions

View file

@ -4,8 +4,10 @@
, ...
}:
with lib;
let
inherit (lib) range filterAttrs attrNames foldl' head tail mkOption mkEnableOption intersectLists genAttrs flip getAttr;
inherit (lib.types) listOf enum package;
cfg = config.my.programs.python;
pythonVersions = map (version: "3${toString version}") (range 8 13);
@ -23,7 +25,7 @@ let
enable = mkEnableOption (toString version);
pythonPackages = mkOption {
default = [ ];
type = with types; listOf (enum (pythonPackages version));
type = listOf (enum (pythonPackages version));
};
};
in
@ -32,11 +34,11 @@ in
versions = genAttrs pythonVersions versionOpts;
defaultPackages = mkOption {
default = [ ];
type = with types; listOf (enum commonPackages);
type = listOf (enum commonPackages);
};
extraPackages = mkOption {
default = [ ];
type = with types; listOf package;
type = listOf package;
};
};