{ lib, config, proxyReverse, ... }: let port = config.services.microbin.settings.MICROBIN_PORT; in { options.my.servers.microbin = { enable = lib.mkEnableOption "enable"; enableCron = lib.mkEnableOption "enable"; }; config = lib.mkIf config.my.servers.microbin.enable { services = { microbin = { enable = true; settings = { MICROBIN_HIDE_LOGO = false; MICROBIN_PORT = 8080; MICROBIN_HIGHLIGHTSYNTAX = true; MICROBIN_PRIVATE = true; MICROBIN_QR = true; MICROBIN_ENCRYPTION_CLIENT_SIDE = true; MICROBIN_ENCRYPTION_SERVER_SIDE = true; }; }; nginx = { enable = true; virtualHosts."copy.${config.my.servers.settings.domain}" = proxyReverse port // { }; }; }; }; }