Add tetris flake
This commit is contained in:
parent
773d6585f5
commit
224de7ccbc
3 changed files with 34 additions and 29 deletions
33
flake.lock
generated
33
flake.lock
generated
|
@ -42,11 +42,11 @@
|
|||
},
|
||||
"emacs-overlay": {
|
||||
"locked": {
|
||||
"lastModified": 1641901534,
|
||||
"narHash": "sha256-Nvm6Zj80fVtzmGsUFYlz9XGFyLnyAe9VoduPmDBu+js=",
|
||||
"lastModified": 1641926379,
|
||||
"narHash": "sha256-zvp7ATyqNv9952TwxPcRg3t8BI2HEIrnPdZHRaUOoU0=",
|
||||
"owner": "nix-community",
|
||||
"repo": "emacs-overlay",
|
||||
"rev": "57378ea2f62e9f450f420dc9d01cc06e0d3dd15e",
|
||||
"rev": "c41bd1462ade47da23e5df9a82badb19c9185bb0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -113,10 +113,31 @@
|
|||
"emacs-overlay": "emacs-overlay",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"tetris": "tetris",
|
||||
"utils": "utils",
|
||||
"zeroad": "zeroad"
|
||||
}
|
||||
},
|
||||
"tetris": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1641928399,
|
||||
"narHash": "sha256-55FwNVfgHReLbaktBx31rtPJFkp+HenD8uLTzV2+GEA=",
|
||||
"owner": "chvp",
|
||||
"repo": "tetris",
|
||||
"rev": "dd70718cac370d2bc44c1b45848969386282970b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "chvp",
|
||||
"repo": "tetris",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils"
|
||||
|
@ -142,11 +163,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1641824052,
|
||||
"narHash": "sha256-xbPD2kYtLAIekf701s6hMo9ArA/8X91CiP9zXqK3me8=",
|
||||
"lastModified": 1641927600,
|
||||
"narHash": "sha256-1zZyiAODX6fwGNylT4/hP/2OphIOctAevl9VPTtbssg=",
|
||||
"owner": "chvp",
|
||||
"repo": "0ad-flake",
|
||||
"rev": "73d0ba0dc3d22e8d67139cc3697afaebca1c6cd9",
|
||||
"rev": "1b93201ef3c24479c3ecd598bb05ad8a3f0faf67",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -16,6 +16,10 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
tetris = {
|
||||
url = "github:chvp/tetris";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
utils.url = "github:gytis-ivaskevicius/flake-utils-plus";
|
||||
zeroad = {
|
||||
url = "github:chvp/0ad-flake";
|
||||
|
@ -23,7 +27,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, accentor, agenix, emacs-overlay, home-manager, zeroad, utils }:
|
||||
outputs = inputs@{ self, nixpkgs, accentor, agenix, emacs-overlay, home-manager, zeroad, tetris, utils }:
|
||||
let
|
||||
customPackages = callPackage: {
|
||||
jdtls = callPackage ./packages/jdtls { };
|
||||
|
@ -38,6 +42,7 @@
|
|||
emacs-overlay.overlay
|
||||
(self: super: customPackages self.callPackage)
|
||||
(self: super: { zeroad = zeroad.packages.x86_64-linux.zeroad; })
|
||||
(self: super: { tetris = tetris.packages.x86_64-linux.tetris; })
|
||||
];
|
||||
};
|
||||
hostDefaults = {
|
||||
|
|
|
@ -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