StackPanel

stackpanel flake add-input

Add a flake input to flake.nix

stackpanel flake add-input

Add a new flake input to flake.nix using tree-sitter for robust parsing.

This command parses the flake.nix file into a syntax tree, inserts the new input declaration, and optionally adds a module import to stackpanelImports.

Comments, formatting, and whitespace are fully preserved.

Examples:

Add a basic input with nixpkgs follows

stackpanel flake add-input sops-nix github:Mic92/sops-nix

Add without nixpkgs follows

stackpanel flake add-input process-compose github:Platonic-Systems/process-compose-flake --no-follows

Add input and module import

stackpanel flake add-input my-module github:author/my-module --module-path stackpanelModules.default

Dry run — show the modified file without writing

stackpanel flake add-input my-module github:author/my-module --dry-run

Usage

stackpanel flake add-input <name> <url>

Flags

FlagTypeDefaultDescription
--dry-runboolfalsePrint modified flake.nix without writing
--followsbooltrueAdd inputs.nixpkgs.follows = "nixpkgs"
--module-pathstringnoneAlso add module import (e.g., stackpanelModules.default)
--no-lockboolfalseSkip running nix flake lock

Global Flags

These flags are inherited from parent commands.

FlagTypeDefaultDescription
--daemon, -dboolfalseRun in daemon mode (no TUI, for background processes)
--no-colorboolfalseDisable color output
--no-tuiboolfalseDisable interactive TUI mode
--verbose, -vboolfalseEnable verbose output

On this page