Nix environment patterns for Ellie's projects. Use when (1) a tool or command is not available on the system, or (2) setting up a new project that needs a development environment. Provides patterns for ad-hoc tool execution and flake-based devShells with direnv.
Provides Nix patterns for ad-hoc tool execution and flake-based dev environments. Triggers when tools are missing or new projects need setup.
/plugin marketplace add wizzeh/skills/plugin install wizzeh-ellies-skills@wizzeh/skillsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
If a command fails because a tool isn't installed, use nix run to execute it:
nix run nixpkgs#<tool> -- <args>
Examples:
nix run nixpkgs#python3 -- script.py
nix run nixpkgs#jq -- '.field' file.json
nix run nixpkgs#ffmpeg -- -i input.mp4 output.gif
nix run nixpkgs#ripgrep -- "pattern" .
Do not suggest installing tools globally. Use nix run for one-off commands.
When a project needs a development environment, create a flake with direnv:
flake.nix{
description = "Project description";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
# Add project dependencies here
];
};
});
}
.envrcuse flake .
direnv allow
.gitignore.direnv/
For Rust projects, use rust-overlay to get the toolchain:
{
description = "Rust project";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, flake-utils, rust-overlay }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs { inherit system overlays; };
rust = pkgs.rust-bin.nightly.latest.default.override {
extensions = [ "rust-src" "rust-analyzer" ];
};
in
{
devShells.default = pkgs.mkShell {
buildInputs = [
rust
];
};
});
}