refactor(services/server): remaming the games section to server
This commit is contained in:
parent
d17919330f
commit
9e9f112e6b
2 changed files with 45 additions and 32 deletions
|
|
@ -1,32 +0,0 @@
|
||||||
{
|
|
||||||
inputs,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
enium-pv = import ./games/minecraft.nix {
|
|
||||||
inherit
|
|
||||||
inputs
|
|
||||||
config
|
|
||||||
pkgs
|
|
||||||
lib
|
|
||||||
;
|
|
||||||
};
|
|
||||||
cfg = config.service;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
enium-pv
|
|
||||||
];
|
|
||||||
|
|
||||||
options.service.games = {
|
|
||||||
enium-pv = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = false;
|
|
||||||
description = "Enable enium private minecraft server";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
45
services/server.nix
Normal file
45
services/server.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
teamspeak = import ./server/teamspeak.nix {
|
||||||
|
inherit
|
||||||
|
inputs
|
||||||
|
config
|
||||||
|
pkgs
|
||||||
|
lib
|
||||||
|
;
|
||||||
|
};
|
||||||
|
minecraft = import ./server/minecraft.nix {
|
||||||
|
inherit
|
||||||
|
inputs
|
||||||
|
config
|
||||||
|
pkgs
|
||||||
|
lib
|
||||||
|
;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
minecraft
|
||||||
|
teamspeak
|
||||||
|
];
|
||||||
|
|
||||||
|
options.service.server = {
|
||||||
|
teamspeak = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Enable the teamspeak";
|
||||||
|
};
|
||||||
|
minecraft = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Enable minecraft server";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue