stackpanel nixify
Convert a file into a Nix file entry expression
stackpanel nixify
Convert an existing file into a stackpanel.files.entries Nix expression.
This reads the file at the given path and produces a Nix snippet that, when added to your stackpanel configuration, will generate an identical file.
Supported types: line-set Treats each non-empty line as an entry in a deduplicated, sorted set (ideal for .gitignore, .dockerignore, etc.) json-ops Emits path-based JSON mutations (ideal for package.json)
Examples: stackpanel nixify .gitignore # auto-detects line-set stackpanel nixify .gitignore --type line-set # explicit type stackpanel nixify apps/web/package.json # emits json-ops stackpanel nixify path/to/.dockerignore # works for any path
Usage
stackpanel nixify <path>Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--type, -t | string | none | Content type (line-set, json-ops). Auto-detected when omitted. |
Backup-on-Adopt
When Stackpanel first starts managing a tracked file through preflight-era
mutations, it can back up the existing file to <path>.backup before applying
its managed changes.
This is especially useful for package.json, where Stackpanel now prefers
path-based JSON mutations over replacing the entire file.
Typical flow:
# generate a Nix snippet for the existing file
stackpanel nixify apps/web/package.json
# add the emitted stackpanel.files.entries snippet to your Nix config
# then re-enter the shell or run:
stackpanel preflight runIf Stackpanel adopts the file, it will preserve the original as
apps/web/package.json.backup.
Global Flags
These flags are inherited from parent commands.
| Flag | Type | Default | Description |
|---|---|---|---|
--daemon, -d | bool | false | Run in daemon mode (no TUI, for background processes) |
--no-color | bool | false | Disable color output |
--no-tui | bool | false | Disable interactive TUI mode |
--verbose, -v | bool | false | Enable verbose output |