Created
April 21, 2026 11:59
-
-
Save pillowtrucker/6fa01f42471fd0717c129ba6c2d3d2eb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| description = "NVIDIA DGX SuperPOD Virtual Lab - Ansible control environment"; | |
| inputs = { | |
| nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | |
| }; | |
| outputs = | |
| { self, nixpkgs }: | |
| let | |
| system = "x86_64-linux"; | |
| config = { | |
| allowUnfree = true; | |
| allowUnfreePredicate = _: true; | |
| }; | |
| pkgs = import nixpkgs { | |
| inherit system; | |
| inherit config; | |
| }; | |
| in | |
| { | |
| devShells.${system}.default = pkgs.mkShell { | |
| name = "superpod-lab"; | |
| packages = with pkgs; [ | |
| # Python + uv (uv manages ansible and python deps) | |
| python312 | |
| uv | |
| # Ansible language server for Emacs | |
| # ansible-language-server # removed from nixos... | |
| yaml-language-server | |
| # Utilities | |
| just | |
| jq | |
| yq-go | |
| openssh | |
| sshpass | |
| claude-code | |
| ]; | |
| shellHook = '' | |
| # Create/activate venv | |
| if [ ! -d ".venv" ]; then | |
| echo "Setting up Python environment..." | |
| uv venv | |
| uv pip install -r requirements.txt | |
| source .venv/bin/activate | |
| ansible-galaxy collection install -r requirements.yml | |
| else | |
| source .venv/bin/activate | |
| fi | |
| export ANSIBLE_CONFIG="$PWD/ansible.cfg" | |
| export ANSIBLE_INVENTORY="$PWD/inventory" | |
| # SSH key for lab | |
| if [ ! -f "$HOME/.ssh/superpod_lab" ]; then | |
| ssh-keygen -t ed25519 -f "$HOME/.ssh/superpod_lab" -N "" -C "superpod-lab" | |
| echo "Created SSH key: ~/.ssh/superpod_lab" | |
| echo "Copy to hypervisor: ssh-copy-id -i ~/.ssh/superpod_lab hypervisor" | |
| fi | |
| export SUPERPOD_SSH_KEY="$HOME/.ssh/superpod_lab" | |
| echo "SuperPOD Lab ready. Run: just --list" | |
| ''; | |
| }; | |
| }; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment