javascript-template/nix/modules/template.nix
jasmine 82b429b221
Fix template metadata and naming
- Changed omnix template name from "default" to "vanilla" for clarity
- Updated flake descriptions to describe project type, not template repo
- Added {{package-name}} variable to vanilla/package.json for substitution

Ensures initialized projects have correct metadata and users see "vanilla"
and "nextjs" as template options during initialization.
2025-11-14 12:33:56 +08:00

41 lines
911 B
Nix

{inputs, ...}: let
root = inputs.self;
in {
flake = rec {
templates = {
default = {
description = "Minimal JavaScript template with Vite and Bun";
path = "${root}/templates/vanilla";
};
nextjs = {
description = "Next.js TypeScript template with App Router";
path = "${root}/templates/nextjs";
};
};
om.templates = {
vanilla = {
template = templates.default;
params = [
{
name = "package-name";
description = "Name of the JavaScript package";
placeholder = "my-project";
}
];
};
nextjs = {
template = templates.nextjs;
params = [
{
name = "package-name";
description = "Name of the Next.js project";
placeholder = "my-nextjs-app";
}
];
};
};
};
}