Move particles to its own file
This commit is contained in:
parent
ab77437953
commit
e85403d2b9
4 changed files with 36 additions and 23 deletions
|
@ -49,7 +49,10 @@
|
||||||
docker.enable = true;
|
docker.enable = true;
|
||||||
git.enable = true;
|
git.enable = true;
|
||||||
};
|
};
|
||||||
games.tetris.server = true;
|
games = {
|
||||||
|
particles.server = true;
|
||||||
|
tetris.server = true;
|
||||||
|
};
|
||||||
services = {
|
services = {
|
||||||
matrix.enable = true;
|
matrix.enable = true;
|
||||||
nginx = {
|
nginx = {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
./minecraft
|
./minecraft
|
||||||
./mumble
|
./mumble
|
||||||
|
./particles
|
||||||
./steam
|
./steam
|
||||||
./teeworlds
|
./teeworlds
|
||||||
./tetris
|
./tetris
|
||||||
|
|
24
modules/games/particles/default.nix
Normal file
24
modules/games/particles/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
particles = pkgs.fetchgit {
|
||||||
|
url = "https://git.zeus.gent/midgard/particles.git";
|
||||||
|
sha256 = "0weSBjhSS0XuII5yZXWYUJpPOhetFJKbcsS8WWpodhs=";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.chvp.games.particles.server = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.chvp.games.particles.server {
|
||||||
|
chvp.services.nginx.hosts = [{
|
||||||
|
fqdn = "particles.vanpetegem.me";
|
||||||
|
options = {
|
||||||
|
root = "${particles}/public";
|
||||||
|
locations."/".index = "index.html";
|
||||||
|
};
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,11 +1,5 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
|
||||||
particles = pkgs.fetchgit {
|
|
||||||
url = "https://git.zeus.gent/midgard/particles.git";
|
|
||||||
sha256 = "0weSBjhSS0XuII5yZXWYUJpPOhetFJKbcsS8WWpodhs=";
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
options.chvp.games.tetris.server = lib.mkOption {
|
options.chvp.games.tetris.server = lib.mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
|
@ -13,21 +7,12 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.chvp.games.tetris.server {
|
config = lib.mkIf config.chvp.games.tetris.server {
|
||||||
chvp.services.nginx.hosts = [
|
chvp.services.nginx.hosts = [{
|
||||||
{
|
fqdn = "tetris.vanpetegem.me";
|
||||||
fqdn = "tetris.vanpetegem.me";
|
options = {
|
||||||
options = {
|
root = "${pkgs.tetris}";
|
||||||
root = "${pkgs.tetris}";
|
locations."/".index = "index.html";
|
||||||
locations."/".index = "index.html";
|
};
|
||||||
};
|
}];
|
||||||
}
|
|
||||||
{
|
|
||||||
fqdn = "particles.vanpetegem.me";
|
|
||||||
options = {
|
|
||||||
root = "${particles}/public";
|
|
||||||
locations."/".index = "index.html";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue