javascript-template/templates/nextjs/nix/modules/template.nix
jasmine 2b228ebd52
Restructure templates to include Nix development environment
Moved template directories into templates/ subdirectory (templates/vanilla/
and templates/nextjs/) with complete Nix configuration in each. This ensures
initialized projects have the full development environment with Nix, Bun,
and all tooling out of the box.

Changes:
- Created templates/vanilla/ with flake.nix, nix/, .envrc, and all files
- Created templates/nextjs/ with flake.nix, nix/, .envrc, and all files
- Updated template paths in nix/modules/template.nix
2025-11-14 12:05:50 +08:00

41 lines
891 B
Nix

{inputs, ...}: let
root = inputs.self;
in {
flake = rec {
templates = {
default = {
description = "Minimal JavaScript template with Vite and Bun";
path = "${root}/vanilla";
};
nextjs = {
description = "Next.js TypeScript template with App Router";
path = "${root}/nextjs";
};
};
om.templates = {
default = {
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";
}
];
};
};
};
}