X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FNix.git;a=blobdiff_plain;f=systems%2Feldiron%2Fwebsites%2Fgames%2Fterraforming-mars%2Fdefault.nix;fp=modules%2Fprivate%2Fwebsites%2Ftools%2Fgames%2Fterraforming-mars%2Fdefault.nix;h=e90e72fb82bf3c84c830ab2d60958f99182e4da7;hp=0df5363ae42fba9f2470ebb5561c853c3b290c3a;hb=1a64deeb894dc95e2645a75771732c6cc53a79ad;hpb=fa25ffd4583cc362075cd5e1b4130f33306103f0 diff --git a/modules/private/websites/tools/games/terraforming-mars/default.nix b/systems/eldiron/websites/games/terraforming-mars/default.nix similarity index 51% rename from modules/private/websites/tools/games/terraforming-mars/default.nix rename to systems/eldiron/websites/games/terraforming-mars/default.nix index 0df5363..e90e72f 100644 --- a/modules/private/websites/tools/games/terraforming-mars/default.nix +++ b/systems/eldiron/websites/games/terraforming-mars/default.nix @@ -6,8 +6,32 @@ in { options.myServices.websites.games.terraforming-mars.enable = lib.mkEnableOption "Enable Terraforming mars game"; config = lib.mkIf cfg.enable { + myServices.dns.zones."immae.eu".subdomains.games.subdomains.terraforming-mars = with config.myServices.dns.helpers; + ips servers.eldiron.ips.main; + myServices.chatonsProperties.services.terraforming-mars = { + file.datetime = "2022-08-27T14:20:00"; + service = { + name = "Terraforming Mars"; + description = "Terraforming Mars Boardgame"; + website = "https://terraforming-mars.games.immae.eu/"; + logo = "https://terraforming-mars.games.immae.eu/favicon.ico"; + status.level = "OK"; + status.description = "OK"; + registration."" = ["NONE"]; + registration.load = "OPEN"; + install.type = "PACKAGE"; + }; + software = { + name = "Terraforming Mars"; + website = "https://github.com/terraforming-mars/terraforming-mars"; + license.url = "https://github.com/terraforming-mars/terraforming-mars/blob/main/LICENSE"; + license.name = "GNU General Public License v3.0"; + version = "unversionned"; + source.url = "https://github.com/terraforming-mars/terraforming-mars"; + }; + }; systemd.services.terraforming-mars = { - path = [ pkgs.nodejs pkgs.bashInteractive ]; + path = [ pkgs.nodejs_16 pkgs.bashInteractive ]; description = "Terraforming mars game"; wantedBy = [ "multi-user.target" ]; script = '' @@ -21,6 +45,8 @@ in chown :wwwrun /run/terraforming-mars/socket.sock chmod g+w /run/terraforming-mars/socket.sock ''; + environment.NPM_CONFIG_LOGS_DIR = "%S/terraforming-mars/npm_logs"; + environment.NPM_CONFIG_CACHE = "%S/terraforming-mars/npm_cache"; serviceConfig = { User = "terraformingmars"; DynamicUser = true; @@ -32,9 +58,10 @@ in }; }; + security.acme.certs.games.extraDomainNames = [ "terraforming-mars.games.immae.eu" ]; + security.acme.certs.games.domain = "games.immae.eu"; services.websites.env.tools.vhostConfs.games_terraforming-mars = { certName = "games"; - certMainHost = "games.immae.eu"; hosts = [ "terraforming-mars.games.immae.eu" ]; root = null; extraConfig = [