Add template
This commit is contained in:
parent
9aa3caa0c2
commit
5800a5ebbf
27 changed files with 7866 additions and 1 deletions
51
README.md
51
README.md
|
|
@ -1,2 +1,51 @@
|
|||
# template
|
||||
# Methanium Template
|
||||
|
||||
A pnpm React template with Vite, Tailwind CSS, Methanium UI, MTP, TanStack Router, and a base nix flake.
|
||||
|
||||
## Development
|
||||
|
||||
```sh
|
||||
nix develop
|
||||
pnpm install
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
## Configure MTP
|
||||
|
||||
1. Define the host's communication and data types in `apps/web/type-maps.yaml`.
|
||||
2. Set the connection options in `apps/web/src/mtp-options.ts`.
|
||||
|
||||
The reusable provider and `useMTP` hook are in `packages/mtp/`.
|
||||
|
||||
## Nix
|
||||
|
||||
Build the static frontend:
|
||||
|
||||
```sh
|
||||
nix build
|
||||
```
|
||||
|
||||
To serve it with nginx on NixOS, import the included module:
|
||||
|
||||
```nix
|
||||
{
|
||||
inputs.methanium-template.url =
|
||||
"git+https://git.methanium.net/methanium/template";
|
||||
|
||||
outputs = {nixpkgs, methanium-template, ...}: {
|
||||
nixosConfigurations.host = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
methanium-template.nixosModules.default
|
||||
{
|
||||
services.methanium-template = {
|
||||
enable = true;
|
||||
hostName = "app.example.com";
|
||||
openFirewall = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
|
|
|||
Loading…
Reference in a new issue