Add tetris flake
This commit is contained in:
parent
773d6585f5
commit
224de7ccbc
3 changed files with 34 additions and 29 deletions
|
@ -1,26 +1,5 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
tetris = pkgs.mkYarnPackage rec {
|
||||
pname = "tetris";
|
||||
version = "unstable";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "chvp";
|
||||
repo = "tetris";
|
||||
rev = "main";
|
||||
sha256 = "lH7LV03pRCJnY4ZjklWpmNuWjrQUiy1LwuByQlA1nTg=";
|
||||
};
|
||||
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;
|
||||
|
@ -31,7 +10,7 @@ in
|
|||
chvp.services.nginx.hosts = [{
|
||||
fqdn = "tetris.vanpetegem.me";
|
||||
options = {
|
||||
root = "${tetris}";
|
||||
root = "${pkgs.tetris}";
|
||||
locations."/".index = "index.html";
|
||||
};
|
||||
}];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue