Move particles to its own file

This commit is contained in:
Charlotte Van Petegem 2022-02-13 13:23:13 +01:00
parent ab77437953
commit e85403d2b9
No known key found for this signature in database
GPG key ID: 019E764B7184435A
4 changed files with 36 additions and 23 deletions

View file

@ -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 = {

View file

@ -4,6 +4,7 @@
imports = [ imports = [
./minecraft ./minecraft
./mumble ./mumble
./particles
./steam ./steam
./teeworlds ./teeworlds
./tetris ./tetris

View 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";
};
}];
};
}

View file

@ -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";
};
}
];
}; };
} }