nixos-configuration/services/notebook.nix

23 lines
543 B
Nix

{ system, ... }:
let
notebook = builtins.getFlake
"github:jrpotter/notebook/9ee37c8b7d21a48cf63cf5648b2eff222b55155f";
in
{
services.nginx = {
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
virtualHosts."notebook.jrpotter.com" = {
forceSSL = true;
enableACME = true;
locations."/" = {
root = "${notebook.packages.${system}.app}/share";
tryFiles = "$uri $uri.html $uri/ =404";
};
};
};
}