Manage tetris with NixOS
This commit is contained in:
parent
b4c19b2b08
commit
77219f36b7
9 changed files with 8175 additions and 1507 deletions
37
modules/tetris.nix
Normal file
37
modules/tetris.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
tetris = pkgs.mkYarnPackage rec {
|
||||
pname = "tetris";
|
||||
version = "unstable";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "chvp";
|
||||
repo = "tetris";
|
||||
rev = "a3ff63bb8aecd42241a40ac8f7bdb6acacef7038";
|
||||
sha256 = "0nlj268kwbv45gsmsp2rc2bfdmbiks21pr8zsa22nfkpbm6m4c03";
|
||||
};
|
||||
yarnNix = ./tetris/yarn.nix;
|
||||
buildPhase = "yarn run build";
|
||||
installPhase = ''
|
||||
cp -r deps/tetris/dist $out
|
||||
rm $out/*.map
|
||||
'';
|
||||
distPhase = "true";
|
||||
};
|
||||
in
|
||||
{
|
||||
options.chvp.tetris.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.tetris.enable {
|
||||
chvp.nginx.hosts = [{
|
||||
fqdn = "tetris.vanpetegem.me";
|
||||
options = {
|
||||
root = "${tetris}";
|
||||
locations."/".index = "index.html";
|
||||
};
|
||||
}];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue