-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathshell.nix
More file actions
34 lines (29 loc) · 683 Bytes
/
shell.nix
File metadata and controls
34 lines (29 loc) · 683 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
pkgs ? import <nixpkgs> { },
}:
let
shellInit = pkgs.writeText "haomnilogic-shell-init" ''
# Preserve the user's existing shell configuration
if [ -f "$HOME/.bashrc" ]; then
source "$HOME/.bashrc"
fi
if [ ! -d ".venv" ]; then
echo "--- Initializing venv ---"
uv venv --python python3.14
fi
echo "--- Activating Virtual Environment ---"
source .venv/bin/activate
echo "--- Syncing Project Dependencies ---"
uv sync --all-extras
'';
in
(pkgs.buildFHSEnv {
name = "haomnilogic-fhs";
targetPkgs =
pkgs: with pkgs; [
nodejs
python314
uv
];
runScript = "bash --rcfile ${shellInit}";
}).env