Reorganize repository
This commit is contained in:
parent
da1824edb6
commit
0fc6c32a47
124 changed files with 16295 additions and 1229 deletions
39
modules/games/tetris/default.nix
Normal file
39
modules/games/tetris/default.nix
Normal 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";
|
||||
};
|
||||
}];
|
||||
};
|
||||
}
|
21
modules/games/tetris/package.json
Normal file
21
modules/games/tetris/package.json
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"name": "tetris",
|
||||
"version": "1.0.0",
|
||||
"main": "src/index.ts",
|
||||
"scripts": {
|
||||
"dev": "parcel src/index.html",
|
||||
"build": "parcel build src/index.html"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^4.4.0",
|
||||
"@typescript-eslint/parser": "^4.4.0",
|
||||
"eslint": "^7.11.0",
|
||||
"eslint-config-standard": "^14.1.1",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-promise": "^4.2.1",
|
||||
"eslint-plugin-standard": "^4.0.1",
|
||||
"parcel-bundler": "^1.12.4",
|
||||
"typescript": "^4.0.3"
|
||||
}
|
||||
}
|
5
modules/games/tetris/update.sh
Executable file
5
modules/games/tetris/update.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -p curl yarn2nix -i bash
|
||||
curl -L -O https://github.com/chvp/tetris/raw/master/package.json
|
||||
curl -L -O https://github.com/chvp/tetris/raw/master/yarn.lock
|
||||
yarn2nix --lockfile yarn.lock --no-patch > yarn.nix
|
6108
modules/games/tetris/yarn.lock
Normal file
6108
modules/games/tetris/yarn.lock
Normal file
File diff suppressed because it is too large
Load diff
6621
modules/games/tetris/yarn.nix
Normal file
6621
modules/games/tetris/yarn.nix
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue