about summary refs log tree commit diff
path: root/home/python
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-09-18 10:06:09 -0700
committerFranck Cuny <franck@fcuny.net>2022-09-18 10:06:09 -0700
commitf417a41d2752f6c6f41175fba0c6e5581c9c5a06 (patch)
treec8190bc5f26930c712ae2cf5d170159bdbce12cd /home/python
parentfeat(home/git): sign commits with my ssh key (diff)
downloadworld-f417a41d2752f6c6f41175fba0c6e5581c9c5a06.tar.gz
feat(home/python): add a few more packages
Having requests installed by default is useful to write quickly a
script, and the black formatter is to enforce consistency.
Diffstat (limited to 'home/python')
-rw-r--r--home/python/default.nix10
1 files changed, 8 insertions, 2 deletions
diff --git a/home/python/default.nix b/home/python/default.nix
index 9e72569..cd866be 100644
--- a/home/python/default.nix
+++ b/home/python/default.nix
@@ -1,10 +1,16 @@
 { config, pkgs, lib, ... }:
-let cfg = config.my.home.python;
+let
+  cfg = config.my.home.python;
+  pythonEnv = pkgs.python310.withPackages (p: with p; [
+    requests
+    black
+    isort
+  ]);
 in
 {
   options.my.home.python = with lib; {
     enable = mkEnableOption "python configuration";
   };
 
-  config.home.packages = with pkgs; lib.mkIf cfg.enable ([ python310 ]);
+  config.home.packages = with pkgs.python310Packages; lib.mkIf cfg.enable ([ pythonEnv ]);
 }