🚀 add python module
This commit is contained in:
parent
63e3bee66c
commit
7660c4f6d8
6 changed files with 27 additions and 6 deletions
|
|
@ -21,6 +21,7 @@
|
|||
./kakoune.nix
|
||||
./kitty.nix
|
||||
./ledger
|
||||
./python.nix
|
||||
./rofi
|
||||
./spotify.nix
|
||||
./sway.nix
|
||||
|
|
|
|||
|
|
@ -80,7 +80,6 @@ in
|
|||
|
||||
# python
|
||||
nodePackages.pyright
|
||||
python-dev
|
||||
|
||||
# sh
|
||||
nodePackages.bash-language-server
|
||||
|
|
|
|||
25
modules/programs/python.nix
Normal file
25
modules/programs/python.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.programs.python;
|
||||
in
|
||||
{
|
||||
options.my.programs.python = {
|
||||
enable = mkEnableOption "python";
|
||||
versions = mkOption {
|
||||
default = [ "python310" ];
|
||||
type = with types; listOf str;
|
||||
example = [ "python39" ];
|
||||
apply = versions: builtins.map (version: prev.${version}.withPackages (packages: with packages; [ black pyflakes isort nose pytest python-lsp-server ]));
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.user.moritz.home.packages = cfg.versions;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue