custom: add games options
Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
parent
23348a0fad
commit
b44d03dece
2 changed files with 28 additions and 0 deletions
|
@ -26,6 +26,11 @@
|
|||
};
|
||||
|
||||
settings = {
|
||||
games = {
|
||||
enable = true;
|
||||
abiotic-factor = true;
|
||||
};
|
||||
|
||||
storage.mnt = [
|
||||
"gayme"
|
||||
"gaymer"
|
||||
|
|
23
options/custom/settings/games.nix
Normal file
23
options/custom/settings/games.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.settings.games;
|
||||
in {
|
||||
options.custom.settings.games = {
|
||||
enable = mkOption {default = false;};
|
||||
abiotic-factor = mkOption {default = false;};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
networking.firewall = {
|
||||
# https://github.com/DFJacob/AbioticFactorDedicatedServer
|
||||
allowedTCPPorts = optionals cfg.abiotic-factor [
|
||||
7777
|
||||
27015
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue