mirror of
https://github.com/sajenim/javascript-template.git
synced 2025-12-17 03:50:40 +08:00
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
41 lines
891 B
Nix
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";
|
|
}
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|