From 720621247262b04e07b6ad95c32cc881addae64a Mon Sep 17 00:00:00 2001 From: Charlotte Van Petegem Date: Fri, 28 Jan 2022 22:14:18 +0100 Subject: [PATCH] Host midgard's particles --- modules/games/tetris/default.nix | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/modules/games/tetris/default.nix b/modules/games/tetris/default.nix index 70de3e9c..b4602d8e 100644 --- a/modules/games/tetris/default.nix +++ b/modules/games/tetris/default.nix @@ -1,5 +1,11 @@ { config, lib, pkgs, ... }: +let + particles = pkgs.fetchgit { + url = "https://git.zeus.gent/midgard/particles.git"; + sha256 = "0weSBjhSS0XuII5yZXWYUJpPOhetFJKbcsS8WWpodhs="; + }; +in { options.chvp.games.tetris.server = lib.mkOption { default = false; @@ -7,12 +13,21 @@ }; config = lib.mkIf config.chvp.games.tetris.server { - chvp.services.nginx.hosts = [{ - fqdn = "tetris.vanpetegem.me"; - options = { - root = "${pkgs.tetris}"; - locations."/".index = "index.html"; - }; - }]; + chvp.services.nginx.hosts = [ + { + fqdn = "tetris.vanpetegem.me"; + options = { + root = "${pkgs.tetris}"; + locations."/".index = "index.html"; + }; + } + { + fqdn = "particles.vanpetegem.me"; + options = { + root = "${particles}/public"; + locations."/".index = "index.html"; + }; + } + ]; }; }