kyouma-net/README.md

49 lines
1 KiB
Markdown
Raw Permalink Normal View History

2024-01-18 12:23:40 +01:00
## Deploying using NixOS
Requirements:
- flakes
- Have the `inputs` attrset avaiable in the module args.
Add this flake to your inputs:
```nix
2024-06-19 16:52:34 +02:00
inputs.kyouma-www.url = "git+https://woof.rip/emily/kyouma-net";
2024-01-18 12:23:40 +01:00
```
Import the module and declare your config:
```nix
{ inputs, config, ... }:
let
kyouma-www = inputs.kyouma-www.packages.${config.nixpkgs.hostPlatform.system};
in {
imports = [
inputs.kyouma-www.nixosModules.default
];
services.vyosBld = {
enable = true;
output = "/var/www/example.org/vyos";
buildFlags = {
architecture = "amd64";
build-by = "foo@example.org";
build-type = "release";
version = "1.5-$(date %Y%m%d)";
};
};
services.nginx = {
"example.org" = {
root = kyouma-www.default;
locations = {
"/assets/media/".root = kyouma-www.vid;
"/vyos/" = {
root = config.services.vyosBld.output;
extraConfig = ''
autoindex on;
autoindex_exact_size off;
'';
};
};
};
};
}
```