X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=systems%2Feldiron%2Fwebsites%2Fmgoblin%2Fdefault.nix;fp=modules%2Fprivate%2Fwebsites%2Ftools%2Fmgoblin%2Fdefault.nix;h=f276c62f4f5d56644f08dba84f4ee56ba226100b;hb=1a64deeb894dc95e2645a75771732c6cc53a79ad;hp=1e5f5a0b8e501ca15425c85b2f530e076fb85579;hpb=fa25ffd4583cc362075cd5e1b4130f33306103f0;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/modules/private/websites/tools/mgoblin/default.nix b/systems/eldiron/websites/mgoblin/default.nix similarity index 70% rename from modules/private/websites/tools/mgoblin/default.nix rename to systems/eldiron/websites/mgoblin/default.nix index 1e5f5a0..f276c62 100644 --- a/modules/private/websites/tools/mgoblin/default.nix +++ b/systems/eldiron/websites/mgoblin/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, config, ... }: +{ lib, pkgs, config, mediagoblin, ... }: let env = config.myEnv.tools.mediagoblin; cfg = config.myServices.websites.tools.mediagoblin; @@ -9,6 +9,32 @@ in { }; config = lib.mkIf cfg.enable { + myServices.dns.zones."immae.eu".subdomains.mgoblin = + with config.myServices.dns.helpers; ips servers.eldiron.ips.main; + + myServices.chatonsProperties.services.mediagoblin = { + file.datetime = "2022-08-21T20:00:00"; + service = { + name = "Mediagoblin"; + description = "MediaGoblin is a free software media publishing platform that anyone can run"; + website = "https://mgoblin.immae.eu/"; + logo = "https://mgoblin.immae.eu/mgoblin_static/images/goblin.ico"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["MEMBER" "CLIENT"]; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "Mediagoblin"; + website = "https://mediagoblin.org/"; + license.url = "http://www.gnu.org/licenses/agpl.html"; + license.name = "GNU Affero General Public License"; + version = mcfg.package.version; + source.url = "https://git.savannah.gnu.org/git/mediagoblin.git"; + modules = map (a: a.pluginName) mcfg.package.plugins; + }; + }; secrets.keys."webapps/tools-mediagoblin" = { user = "mediagoblin"; group = "mediagoblin"; @@ -79,7 +105,7 @@ in { services.mediagoblin = { enable = true; - package = pkgs.webapps.mediagoblin.withPlugins (p: [p.basicsearch]); + package = mediagoblin.withPlugins (p: [p.basicsearch]); configFile = config.secrets.fullPaths."webapps/tools-mediagoblin"; }; services.filesWatcher.mediagoblin-web = { @@ -95,9 +121,9 @@ in { "proxy" "proxy_http" ]; users.users.wwwrun.extraGroups = [ "mediagoblin" ]; + security.acme.certs.eldiron.extraDomainNames = [ "mgoblin.immae.eu" ]; services.websites.env.tools.vhostConfs.mgoblin = { certName = "eldiron"; - addToCerts = true; hosts = ["mgoblin.immae.eu" ]; root = null; extraConfig = [ '' @@ -130,5 +156,18 @@ in { ProxyPassReverse / unix://${mcfg.sockets.paster}|http://mgoblin.immae.eu/ '' ]; }; + myServices.monitoring.fromMasterActivatedPlugins = [ "http" ]; + myServices.monitoring.fromMasterObjects.service = [ + { + service_description = "mediagoblin website is running on mgoblin.immae.eu"; + host_name = config.hostEnv.fqdn; + use = "external-web-service"; + check_command = ["check_https" "mgoblin.immae.eu" "/" "GNU MediaGoblin"]; + + servicegroups = "webstatus-webapps"; + _webstatus_name = "Mediagoblin"; + _webstatus_url = "https://mgoblin.immae.eu/"; + } + ]; }; }