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