Manage tetris with NixOS
This commit is contained in:
parent
b4c19b2b08
commit
77219f36b7
9 changed files with 8175 additions and 1507 deletions
|
@ -22,6 +22,7 @@
|
|||
smartd.enable = true;
|
||||
sshd.enable = true;
|
||||
syncthing-server.enable = true;
|
||||
tetris.enable = true;
|
||||
zfs = {
|
||||
enable = true;
|
||||
backups = [{
|
||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -20,6 +20,7 @@
|
|||
./sshd.nix
|
||||
./syncthing-server.nix
|
||||
./teeworlds.nix
|
||||
./tetris.nix
|
||||
./tmux.nix
|
||||
./zeroad.nix
|
||||
./zfs.nix
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, ...}:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
options.chvp.nextcloud.enable = lib.mkOption {
|
||||
|
|
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";
|
||||
};
|
||||
}];
|
||||
};
|
||||
}
|
5
modules/tetris/update.sh
Executable file
5
modules/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/yarn.lock
|
||||
yarn2nix --lockfile yarn.lock --no-patch > yarn.nix
|
||||
rm yarn.lock
|
6621
modules/tetris/yarn.nix
Normal file
6621
modules/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