diff --git a/machines/gerd.nix b/machines/gerd.nix index 7435bd5..329592a 100644 --- a/machines/gerd.nix +++ b/machines/gerd.nix @@ -13,6 +13,7 @@ ./gerd/services/teeworlds.nix ./gerd/services/murmur.nix ./gerd/services/hedgedoc.nix + ./gerd/services/cyberchef.nix ./gerd/services/member-website diff --git a/machines/gerd/services/cyberchef.nix b/machines/gerd/services/cyberchef.nix new file mode 100644 index 0000000..9bc64fe --- /dev/null +++ b/machines/gerd/services/cyberchef.nix @@ -0,0 +1,27 @@ +{ config, pkgs, ... }: + +let + svc_domain = "cyberchef.${config.mine.shared.settings.domain}"; + pkg_cyberchef = pkgs.cyberchef; +in { + services.nginx.virtualHosts."${svc_domain}" = { + forceSSL = true; + enableACME = true; + locations."/".root = pkg_cyberchef + "/share/cyberchef"; + }; + + + mine.shared.meta.cyberchef = { + name = "CyberChef"; + description = "We host our own CyberChef instance."; + url = "https://${svc_domain}"; + + package = let + pkg = pkg_cyberchef; + in { + name = pkg.pname; + version = pkg.version; + meta = pkg.meta; + }; + }; +}