StackPanel
Internal DocsModulesEnv codegen

env-codegen/module.nix

Generates the packages/gen/env structure from stackpanel.apps configuration.

Generates the packages/gen/env structure from stackpanel.apps configuration.

This module integrates env-package.nix codegen into the files system, ensuring all generated files are created on devshell entry.

Generated files:

packages/gen/env/ generated package shell
  package.json, tsconfig.json, README.md
  src/ 100% generated (do not edit)
    <app>/<env>.ts, <app>/index.ts, index.ts
    <app>.ts app-level env export (@gen/env/web)
    embedded-data.ts embedded plaintext + encrypted payloads
    entrypoints/<app>.ts, entrypoints/index.ts
    loader.ts, docker-entrypoint.ts

Usage

# The module is automatically enabled when apps have environments
stackpanel.apps.web.environments.dev.env = {
  DATABASE_URL = "ref+sops://...";
};

On this page