Finish migration to NixOS modules

This commit is contained in:
Paul-Henri Froidmont 2024-03-26 23:37:53 +01:00
parent aef5eabce5
commit d944e36197
Signed by: phfroidmont
GPG key ID: BE948AFD7E7873BE
21 changed files with 1071 additions and 1151 deletions

View file

@ -1,21 +1,24 @@
{ config, lib, pkgs, ... }:
{
{ config, lib, ... }:
let cfg = config.custom.services.monero;
in {
options.custom.services.monero = { enable = lib.mkEnableOption "monero"; };
services.monero = {
enable = true;
rpc.restricted = true;
};
config = lib.mkIf cfg.enable {
services.monero = {
enable = true;
rpc.restricted = true;
};
services.nginx.virtualHosts."monero.${config.networking.domain}" = {
forceSSL = true;
enableACME = true;
services.nginx.virtualHosts."monero.${config.networking.domain}" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://127.0.0.1:18081";
extraConfig = ''
proxy_http_version 1.1;
'';
locations."/" = {
proxyPass = "http://127.0.0.1:18081";
extraConfig = ''
proxy_http_version 1.1;
'';
};
};
};
}