From 947f154a815cf1638bb4627d3ced157fd3f50b07 Mon Sep 17 00:00:00 2001 From: Lumpiasty Date: Mon, 21 Apr 2025 23:01:58 +0200 Subject: [PATCH] use nix provided python as default interpreter --- .vscode/settings.json | 3 ++- flake.nix | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 7469ead..dbba6d1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -8,5 +8,6 @@ } }, "terminal.integrated.defaultProfile.linux": "Nix Shell", - "ansible.python.interpreterPath": "/bin/python" + "ansible.python.interpreterPath": "/bin/python", + "python.defaultInterpreterPath": "${env:PYTHON_BIN}" } diff --git a/flake.nix b/flake.nix index d21d619..02464c0 100644 --- a/flake.nix +++ b/flake.nix @@ -19,12 +19,13 @@ overlays = [ krew2nix.overlay ]; inherit system; }; + python = (pkgs.python313.withPackages (python-pkgs: with python-pkgs; [ + hvac + ])); in pkgs.mkShell { packages = with pkgs; [ - (python313.withPackages (python-pkgs: with python-pkgs; [ - hvac - ])) + python vim gnumake talosctl cilium-cli kubectx k9s kubernetes-helm @@ -53,6 +54,8 @@ # Add scripts from utils subdir export PATH="$PATH:$(pwd)/utils" + + export PYTHON_BIN=${python}/bin/python ''; }; };