nix-config/configs/nixos/miniserve-static.nix
Gabe Venberg e8a5bb3bc9 many things:
* flake.lock update, with code changes needed.
* miniserve.rs static directory listing.
* change from typst-ls to tinymist for typst lsp
* deletion of hugo template.
* change from self-built duckdns module to nixpkgs one.
2025-02-24 11:39:38 +01:00

36 lines
749 B
Nix

{
inputs,
config,
pkgs,
lib,
...
}:let
port="8080";
in {
systemd.services.miniserve = {
wantedBy = ["multi-user.target"];
after = ["network.target"];
description = "A directory listing miniserve instance";
serviceConfig = {
ExecStart = lib.concatStringsSep " " [
"${pkgs.miniserve}/bin/miniserve"
"--enable-tar-gz"
"--show-wget-footer"
"--readme"
"--port ${port}"
"--qrcode"
# "--no-symlinks"
"--interfaces 127.0.0.1"
"/storage/miniserve"
];
};
};
services.nginx.virtualHosts."static.venberg.xyz" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://localhost:${port}";
};
};
}