self-hosting/modules/monero.nix

25 lines
548 B
Nix
Raw Permalink Normal View History

2024-03-26 23:37:53 +01:00
{ config, lib, ... }:
let cfg = config.custom.services.monero;
in {
options.custom.services.monero = { enable = lib.mkEnableOption "monero"; };
2021-12-09 09:28:28 +01:00
2024-03-26 23:37:53 +01:00
config = lib.mkIf cfg.enable {
services.monero = {
enable = true;
rpc.restricted = true;
};
2021-12-09 09:28:28 +01:00
2024-03-26 23:37:53 +01:00
services.nginx.virtualHosts."monero.${config.networking.domain}" = {
forceSSL = true;
enableACME = true;
2021-12-09 09:28:28 +01:00
2024-03-26 23:37:53 +01:00
locations."/" = {
proxyPass = "http://127.0.0.1:18081";
extraConfig = ''
proxy_http_version 1.1;
'';
};
2021-12-09 09:28:28 +01:00
};
};
}