# Forgejo { config, pkgs, lib, ... }: let inherit (lib) mkOption mkDefault; in { options = { nixin.etherpad = { domain = mkOption { type = lib.types.str; }; }; }; config = { networking.hosts = { "127.0.0.1" = [ "${config.nixin.etherpad.domain}" ]; }; # Etherpad is not yes packaged for nixos, so we deploy it using docker virtualisation.oci-containers.containers.etherpad = { autoStart = true; image = "etherpad/etherpad"; extraOptions = [ "--label=traefik.enable=true" "--label=traefik.http.routers.etherpad.entrypoints=websecure" "--label=traefik.http.routers.etherpad.rule=Host(`${config.nixin.etherpad.domain}`)" "--label=traefik.http.routers.etherpad.tls=true" "--label=traefik.http.services.etherpad.loadbalancer.server.port=9001" "--label=traefik.http.routers.etherpad.tls.certresolver=acme-challenge" ]; }; }; }