This repository has been archived on 2024-08-30. You can view files and clone it, but cannot push or open issues or pull requests.
infrastructure/hosts/carbon/services/privacy/scribe.nix

32 lines
777 B
Nix
Raw Normal View History

{ 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;
'';
};
};
};
};
}