From 2fda48bbb54282dca31a06da7c6d8cfa7cfbed15 Mon Sep 17 00:00:00 2001 From: Martin Larsson Date: Tue, 22 Apr 2025 15:27:44 +0200 Subject: [PATCH] Add python313 to personal machines with pipx, and add pipx to the already existing 311 python on work machine --- nix/pkgs/darwin_personal.nix | 9 ++++++++- nix/pkgs/darwin_work.nix | 10 +++++++++- nix/pkgs/linux.nix | 9 ++++++++- nix/pkgs/wsl.nix | 9 ++++++++- 4 files changed, 33 insertions(+), 4 deletions(-) diff --git a/nix/pkgs/darwin_personal.nix b/nix/pkgs/darwin_personal.nix index 5e86ce3..0993fbd 100644 --- a/nix/pkgs/darwin_personal.nix +++ b/nix/pkgs/darwin_personal.nix @@ -1,10 +1,17 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: { home = { packages = with pkgs; [ + (python313.withPackages (pythonPkgs: [ + pythonPkgs.pipx + ])) clang clang-tools ]; }; + home.activation.installVectorcode = lib.hm.dag.entryAfter [ "writeBoundary" ] '' + echo "Installing VectorCode with pipx..." + $DRY_RUN_CMD ${pkgs.python311Packages.pipx}/bin/pipx install --force vectorcode + ''; } diff --git a/nix/pkgs/darwin_work.nix b/nix/pkgs/darwin_work.nix index 8405f7e..86d3acc 100644 --- a/nix/pkgs/darwin_work.nix +++ b/nix/pkgs/darwin_work.nix @@ -1,9 +1,10 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: { home = { packages = with pkgs; [ (python311.withPackages (pythonPkgs: [ pythonPkgs.pip + pythonPkgs.pipx pythonPkgs.setuptools ])) pcre @@ -12,4 +13,11 @@ ]; }; + (python313.withPackages (pythonPkgs: [ + pythonPkgs.pipx + ])) + home.activation.installVectorcode = lib.hm.dag.entryAfter [ "writeBoundary" ] '' + echo "Installing VectorCode with pipx..." + $DRY_RUN_CMD ${pkgs.python311Packages.pipx}/bin/pipx install --force vectorcode + ''; } diff --git a/nix/pkgs/linux.nix b/nix/pkgs/linux.nix index 9bf1ed0..bf9fdd8 100644 --- a/nix/pkgs/linux.nix +++ b/nix/pkgs/linux.nix @@ -1,12 +1,19 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: { home = { packages = with pkgs; [ + (python313.withPackages (pythonPkgs: [ + pythonPkgs.pipx + ])) wl-clipboard-rs sway clang clang-tools ]; + home.activation.installVectorcode = lib.hm.dag.entryAfter [ "writeBoundary" ] '' + echo "Installing VectorCode with pipx..." + $DRY_RUN_CMD ${pkgs.python311Packages.pipx}/bin/pipx install --force vectorcode + ''; file = { ".config/sway".source = ../sway; }; diff --git a/nix/pkgs/wsl.nix b/nix/pkgs/wsl.nix index 7ca6434..1d21faa 100644 --- a/nix/pkgs/wsl.nix +++ b/nix/pkgs/wsl.nix @@ -1,10 +1,17 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: { home = { packages = with pkgs; [ + (python313.withPackages (pythonPkgs: [ + pythonPkgs.pipx + ])) wslu clang clang-tools ]; }; + home.activation.installVectorcode = lib.hm.dag.entryAfter [ "writeBoundary" ] '' + echo "Installing VectorCode with pipx..." + $DRY_RUN_CMD ${pkgs.python311Packages.pipx}/bin/pipx install --force vectorcode + ''; }