Added a template .envrc to the python dev-flake, and silenced direnv

This commit is contained in:
Alexandre 2026-02-08 16:47:38 +01:00
parent 8d539d344e
commit 85a8864e92
11 changed files with 2218 additions and 8 deletions

View File

@ -0,0 +1,19 @@
#!/usr/bin/env bash
set -e
if [[ ! -d "/home/alex/Developer/nix/NixOSDots/dev-flakes/python" ]]; then
echo "Cannot find source directory; Did you move it?"
echo "(Looking for "/home/alex/Developer/nix/NixOSDots/dev-flakes/python")"
echo 'Cannot force reload with this script - use "direnv reload" manually and then try again'
exit 1
fi
# rebuild the cache forcefully
_nix_direnv_force_reload=1 direnv exec "/home/alex/Developer/nix/NixOSDots/dev-flakes/python" true
# Update the mtime for .envrc.
# This will cause direnv to reload again - but without re-building.
touch "/home/alex/Developer/nix/NixOSDots/dev-flakes/python/.envrc"
# Also update the timestamp of whatever profile_rc we have.
# This makes sure that we know we are up to date.
touch -r "/home/alex/Developer/nix/NixOSDots/dev-flakes/python/.envrc" "/home/alex/Developer/nix/NixOSDots/dev-flakes/python/.direnv"/*.rc

View File

@ -0,0 +1 @@
/nix/store/01x5k4nlxcpyd85nnr0b9gm89rm8ff4x-source

View File

@ -0,0 +1 @@
/nix/store/a4v9vcmx3xx0cblzv3rx2anilwaz1g2k-source

View File

@ -0,0 +1 @@
/nix/store/ih9vmk2a3mrk6vhmibqzji6kjc6parzp-source

View File

@ -0,0 +1 @@
/nix/store/yj1wxm9hh8610iyzqnz75kvs6xl8j3my-source

View File

@ -0,0 +1 @@
/nix/store/hrdiifirpw0fa5pp9cjg5vmydhalvb4k-python-ml-env

3
dev-flakes/python/.envrc Normal file
View File

@ -0,0 +1,3 @@
export FLAKEDIR=~/Developer/nix/NixOSDots/dev-flakes
use flake ${FLAKEDIR}/python

View File

@ -21,7 +21,8 @@
name = "python-ml"; name = "python-ml";
packages = with pkgs; [ packages = with pkgs; [
python python314
python314.pkgs.pygame
#python.pkgs.pip #python.pkgs.pip
#python.pkgs.virtualenv #python.pkgs.virtualenv
@ -37,8 +38,7 @@
]; ];
shellHook = '' shellHook = ''
echo "🐍 Python ML dev shell" echo "Python loaded"
export PYTHONBREAKPOINT=ipdb.set_trace
''; '';
}; };
}); });

View File

@ -3,6 +3,7 @@
programs = { programs = {
direnv = { direnv = {
enable = true; enable = true;
silent = true;
enableZshIntegration = true; enableZshIntegration = true;
}; };
}; };

View File

@ -30,7 +30,7 @@ let
in in
{ {
environment.systemPackages = [ home.packages = [
(pkgs.wrapFirefox (pkgs.wrapFirefox
inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.zen-browser-unwrapped inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.zen-browser-unwrapped
{ {
@ -66,10 +66,10 @@ in
Alias = "@nw"; Alias = "@nw";
} }
{ {
Name = "noogle"; Name = "Brave Search";
URLTemplate = "https://noogle.dev/q?term={searchTerms}"; URLTemplate = "https://search.brave.com/search?q={searchTerms}";
IconURL = "https://noogle.dev/favicon.ico"; IconURL = "https://brave.com/favicon.ico";
Alias = "@ng"; Alias = "@brave";
} }
]; ];
}; };