refactor: nix fmt classic to nix fmt
This commit is contained in:
parent
ca78adc858
commit
f9614371a3
57 changed files with 923 additions and 493 deletions
|
|
@ -15,7 +15,7 @@ nix develop # or: nix develop .#default
|
|||
|
||||
**Includes:**
|
||||
- Git
|
||||
- nixfmt-classic
|
||||
- nixfmt
|
||||
- uv (for `uvx` commands)
|
||||
|
||||
**MCP helper:**
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
{ pkgs, lib, customPkgs, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
customPkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
pkgs.mkShell {
|
||||
name = "ai-agent";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,13 @@
|
|||
{ pkgs, lib, python ? pkgs.python312, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
python ? pkgs.python312,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
pythonWithAI = python.withPackages (ps:
|
||||
pythonWithAI = python.withPackages (
|
||||
ps:
|
||||
let
|
||||
basePackages = with ps; [
|
||||
accelerate
|
||||
|
|
@ -25,12 +31,28 @@ let
|
|||
tokenizers
|
||||
transformers
|
||||
];
|
||||
linuxOnlyPackages = lib.optionals pkgs.stdenv.isLinux
|
||||
(with ps; [ sentencepiece torch torchaudio torchvision ]);
|
||||
in basePackages ++ linuxOnlyPackages);
|
||||
in pkgs.mkShell {
|
||||
linuxOnlyPackages = lib.optionals pkgs.stdenv.isLinux (
|
||||
with ps;
|
||||
[
|
||||
sentencepiece
|
||||
torch
|
||||
torchaudio
|
||||
torchvision
|
||||
]
|
||||
);
|
||||
in
|
||||
basePackages ++ linuxOnlyPackages
|
||||
);
|
||||
in
|
||||
pkgs.mkShell {
|
||||
name = "ai-notebook";
|
||||
packages = with pkgs; [ pythonWithAI uv git-lfs ruff pyright ];
|
||||
packages = with pkgs; [
|
||||
pythonWithAI
|
||||
uv
|
||||
git-lfs
|
||||
ruff
|
||||
pyright
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
export UV_PYTHON="${pythonWithAI}/bin/python3"
|
||||
|
|
|
|||
|
|
@ -8,15 +8,17 @@ let
|
|||
'';
|
||||
|
||||
# Generate MCP configs for GUI applications
|
||||
mcpConfigForGUI = pkgs.writeText "mcp_settings.json" (builtins.toJSON {
|
||||
mcpServers = {
|
||||
nixos = {
|
||||
type = "stdio";
|
||||
command = "${mcpNixosWrapper}/bin/mcp-nixos-wrapper";
|
||||
args = [ ];
|
||||
mcpConfigForGUI = pkgs.writeText "mcp_settings.json" (
|
||||
builtins.toJSON {
|
||||
mcpServers = {
|
||||
nixos = {
|
||||
type = "stdio";
|
||||
command = "${mcpNixosWrapper}/bin/mcp-nixos-wrapper";
|
||||
args = [ ];
|
||||
};
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
# Script to install MCP configs for Claude Code and Codex
|
||||
installMcpConfigs = pkgs.writeShellScriptBin "install-mcp-configs" ''
|
||||
|
|
@ -83,12 +85,13 @@ let
|
|||
"$out_link/bin/nvim" "$@"
|
||||
'';
|
||||
|
||||
in pkgs.mkShell {
|
||||
in
|
||||
pkgs.mkShell {
|
||||
name = "default";
|
||||
packages = with pkgs; [
|
||||
git
|
||||
nix
|
||||
nixfmt-classic
|
||||
nixfmt
|
||||
uv
|
||||
python3
|
||||
mcpNixosWrapper
|
||||
|
|
|
|||
|
|
@ -93,7 +93,8 @@ let
|
|||
echo " bun es list - Browse Effect patterns"
|
||||
'';
|
||||
|
||||
in pkgs.mkShell {
|
||||
in
|
||||
pkgs.mkShell {
|
||||
name = "effect-ts";
|
||||
packages = with pkgs; [
|
||||
bun
|
||||
|
|
|
|||
|
|
@ -2,7 +2,13 @@
|
|||
|
||||
pkgs.mkShell {
|
||||
name = "go";
|
||||
packages = with pkgs; [ go gopls golangci-lint delve git ];
|
||||
packages = with pkgs; [
|
||||
go
|
||||
gopls
|
||||
golangci-lint
|
||||
delve
|
||||
git
|
||||
];
|
||||
shellHook = ''
|
||||
mkdir -p "$PWD/.cache/go" "$PWD/.cache/gomod"
|
||||
export GOPATH="$PWD/.cache/go"
|
||||
|
|
|
|||
|
|
@ -1,9 +1,13 @@
|
|||
{ pkgs, python ? pkgs.python312, ... }:
|
||||
{
|
||||
pkgs,
|
||||
python ? pkgs.python312,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
# Python environment with notebook tooling and core data-science libs
|
||||
pythonWithNotebook = python.withPackages (ps:
|
||||
with ps; [
|
||||
pythonWithNotebook = python.withPackages (
|
||||
ps: with ps; [
|
||||
altair
|
||||
ipykernel
|
||||
jupyterlab
|
||||
|
|
@ -15,10 +19,17 @@ let
|
|||
scipy
|
||||
scikit-learn
|
||||
seaborn
|
||||
]);
|
||||
in pkgs.mkShell {
|
||||
]
|
||||
);
|
||||
in
|
||||
pkgs.mkShell {
|
||||
name = "jupyter-notebook";
|
||||
packages = [ pythonWithNotebook pkgs.ruff pkgs.pyright pkgs.git ];
|
||||
packages = [
|
||||
pythonWithNotebook
|
||||
pkgs.ruff
|
||||
pkgs.pyright
|
||||
pkgs.git
|
||||
];
|
||||
shellHook = ''
|
||||
export PYTHONNOUSERSITE=1
|
||||
export JUPYTER_CONFIG_DIR="''${XDG_CONFIG_HOME:-$HOME/.config}/jupyter"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,17 @@
|
|||
{ pkgs, python ? pkgs.python312, ... }:
|
||||
{
|
||||
pkgs,
|
||||
python ? pkgs.python312,
|
||||
...
|
||||
}:
|
||||
|
||||
pkgs.mkShell {
|
||||
name = "python-uv";
|
||||
packages = [ python pkgs.uv pkgs.ruff pkgs.pyright ];
|
||||
packages = [
|
||||
python
|
||||
pkgs.uv
|
||||
pkgs.ruff
|
||||
pkgs.pyright
|
||||
];
|
||||
shellHook = ''
|
||||
export UV_PYTHON="${python}/bin/python3"
|
||||
export UV_LINK_MODE=copy
|
||||
|
|
|
|||
|
|
@ -2,7 +2,13 @@
|
|||
|
||||
pkgs.mkShell {
|
||||
name = "rust";
|
||||
packages = with pkgs; [ cargo rustc rust-analyzer rustfmt clippy ];
|
||||
packages = with pkgs; [
|
||||
cargo
|
||||
rustc
|
||||
rust-analyzer
|
||||
rustfmt
|
||||
clippy
|
||||
];
|
||||
shellHook = ''
|
||||
mkdir -p "$PWD/.cache/cargo"
|
||||
export CARGO_HOME="$PWD/.cache/cargo"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue