32 lines
777 B
Nix
32 lines
777 B
Nix
|
{ pkgs, config, ... }: {
|
||
|
|
||
|
|
||
|
services.scribe = {
|
||
|
enable = true;
|
||
|
appDomain = "scribe.${config.networking.domain}";
|
||
|
port = 7283;
|
||
|
# TODO fix since it's readable by nix store...
|
||
|
environmentFile = ''
|
||
|
GITHUB_PERSONAL_ACCESS_TOKEN= ${builtins.readFile config.age.secrets.github-token.path}
|
||
|
GITHUB_USERNAME= ${builtins.readFile config.age.secrets.github-username.path}
|
||
|
'';
|
||
|
};
|
||
|
|
||
|
services.nginx = {
|
||
|
virtualHosts = {
|
||
|
|
||
|
"scribe.${config.networking.domain}" = {
|
||
|
forceSSL = true;
|
||
|
enableACME = true;
|
||
|
locations."/" = {
|
||
|
proxyPass = " http://127.0.0.1:7283";
|
||
|
extraConfig = ''
|
||
|
access_log /var/log/nginx/$server_name-access.log json_analytics;
|
||
|
'';
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|
||
|
}
|