{ config, pkgs, lib, ... }: let cfg = config.my.home.python; pythonEnv = pkgs.python310.withPackages (p: with p; [ black # format isort # format pylsp-mypy # language server protocol requests # HTTP library # HTTP lib ]); in { options.my.home.python = with lib; { enable = mkEnableOption "python configuration"; }; config.home.packages = with pkgs.python310Packages; lib.mkIf cfg.enable ([ pythonEnv ]); }