Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
61 lines (51 loc) · 1.93 KB
/
Copy pathflake.nix
File metadata and controls
61 lines (51 loc) · 1.93 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{
description = "dev shell";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs = { self, nixpkgs }:
let
pkgs = import nixpkgs {
system = "x86_64-linux";
config.allowUnfreePredicate = pkg: builtins.elem (nixpkgs.lib.getName pkg) [ "terraform" ];
};
in {
devShells.x86_64-linux.default = pkgs.mkShell {
packages = with pkgs; [
docker
# Java / Spring Boot services (services/springboot, auth-service, notes-service, ...)
jdk25
maven
# web-client (React + Vite + TypeScript)
nodejs_24
# ai-assistant (FastAPI)
python314
python314Packages.pip
python314Packages.virtualenv
ruff
# Kubernetes deploy (Makefile / scripts/*.sh, helm/caredesk chart)
kubectl
kubernetes-helm
kind
# infra/terraform (azurerm provider)
terraform
# infra/ansible (VM provisioning)
ansible
git
];
# api/scripts/gen-all.sh creates a venv at api/scripts/.venv and pip-installs
# ruff into it, then puts that venv's bin/ first on PATH so
# openapi-python-client can shell out to it. pip's ruff wheel ships a
# generic-glibc binary that can't run on NixOS (no /lib64/ld-linux-*), so
# pre-create that venv here and swap in the properly linked nix build —
# this fixes it without touching the (checked-in, CI-shared) script.
shellHook = ''
repo_root="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
gen_venv="$repo_root/api/scripts/.venv"
if [ ! -d "$gen_venv" ]; then
python3 -m venv "$gen_venv"
"$gen_venv/bin/pip" install -q --disable-pip-version-check -r "$repo_root/api/scripts/gen-requirements.txt"
fi
ln -sf "${pkgs.ruff}/bin/ruff" "$gen_venv/bin/ruff"
'';
};
};
}