Reorganize repository

This commit is contained in:
Charlotte Van Petegem 2021-07-10 09:03:38 +02:00
parent da1824edb6
commit 0fc6c32a47
No known key found for this signature in database
GPG key ID: 019E764B7184435A
124 changed files with 16295 additions and 1229 deletions

View file

@ -0,0 +1,39 @@
{ config, lib, pkgs, ... }:
let
tetris = pkgs.mkYarnPackage rec {
pname = "tetris";
version = "unstable";
src = pkgs.fetchFromGitHub {
owner = "chvp";
repo = "tetris";
rev = "a3ff63bb8aecd42241a40ac8f7bdb6acacef7038";
sha256 = "0nlj268kwbv45gsmsp2rc2bfdmbiks21pr8zsa22nfkpbm6m4c03";
};
packageJSON = ./package.json;
yarnLock = ./yarn.lock;
yarnNix = ./yarn.nix;
buildPhase = "yarn run build";
installPhase = ''
cp -r deps/tetris/dist $out
rm $out/*.map
'';
distPhase = "true";
};
in
{
options.chvp.games.tetris.server = lib.mkOption {
default = false;
example = true;
};
config = lib.mkIf config.chvp.games.tetris.server {
chvp.services.nginx.hosts = [{
fqdn = "tetris.vanpetegem.me";
options = {
root = "${tetris}";
locations."/".index = "index.html";
};
}];
};
}