Compare commits
No commits in common. "1705d336086be696cf67419a17782323537e5803" and "7ae2517c04b237ca2f803eb021e2d15777ac2730" have entirely different histories.
1705d33608
...
7ae2517c04
@ -17,8 +17,8 @@ in
|
|||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
(builtins.fetchTarball {
|
(builtins.fetchTarball {
|
||||||
url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/v2.2.0/nixos-mailserver-v2.2.0.tar.gz";
|
url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/817d84d36d34616ecf1a6ed6cba4fb1327b3a74f/nixos-mailserver-817d84d36d34616ecf1a6ed6cba4fb1327b3a74f.tar.gz";
|
||||||
sha256 = "0gqzgy50hgb5zmdjiffaqp277a68564vflfpjvk1gv6079zahksc";
|
sha256 = "0f7j61nlh4f3nqq3hbw0k4aq4mnmlp12cmkvyfwzrai92lpza4f9";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -42,6 +42,9 @@ in
|
|||||||
certificateFile = "/var/lib/acme/${cfg.domaine}/fullchain.pem";
|
certificateFile = "/var/lib/acme/${cfg.domaine}/fullchain.pem";
|
||||||
keyFile = "/var/lib/acme/${cfg.domaine}/key.pem";
|
keyFile = "/var/lib/acme/${cfg.domaine}/key.pem";
|
||||||
|
|
||||||
|
# Length of the Diffie Hillman prime used
|
||||||
|
dhParamBitLength = 4096;
|
||||||
|
|
||||||
# Enable IMAP and POP3
|
# Enable IMAP and POP3
|
||||||
enableImap = true;
|
enableImap = true;
|
||||||
enablePop3 = true;
|
enablePop3 = true;
|
||||||
|
@ -13,7 +13,7 @@ parser.add_argument('--repo')
|
|||||||
parser.add_argument('--cache-dir')
|
parser.add_argument('--cache-dir')
|
||||||
args = vars(parser.parse_args())
|
args = vars(parser.parse_args())
|
||||||
|
|
||||||
channel_req = urllib.request.Request(url='https://nixos.org/channels/nixos-18.09/git-revision')
|
channel_req = urllib.request.Request(url='https://nixos.org/channels/nixos-18.09-small/git-revision')
|
||||||
latest_commit = urllib.request.urlopen(channel_req).read().decode('utf-8')
|
latest_commit = urllib.request.urlopen(channel_req).read().decode('utf-8')
|
||||||
try:
|
try:
|
||||||
previous_commit = open(args['cache_dir'] + '/git-revision', 'r').read()
|
previous_commit = open(args['cache_dir'] + '/git-revision', 'r').read()
|
||||||
|
@ -1,113 +0,0 @@
|
|||||||
{lib, config, pkgs, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.services.sdtdserver;
|
|
||||||
gamePath = "/var/lib/sdtdserver";
|
|
||||||
gameOptions = {
|
|
||||||
ServerPort="26900";
|
|
||||||
ServerIsPublic="true";
|
|
||||||
ServerName="Serveur des loutres";
|
|
||||||
ServerPassword="";
|
|
||||||
ServerMaxPlayerCount="16";
|
|
||||||
ServerReservedSlots="0";
|
|
||||||
ServerReservedSlotsPermission="100";
|
|
||||||
ServerAdminSlots="0";
|
|
||||||
ServerAdminSlotsPermission="0";
|
|
||||||
ServerDescription="Un serveur idiot anti gilets jaunes";
|
|
||||||
ServerWebsiteURL="";
|
|
||||||
ServerDisabledNetworkProtocols="UNET";
|
|
||||||
GameWorld="Random Gen";
|
|
||||||
GameName="Loutre Game";
|
|
||||||
GameDifficulty="2";
|
|
||||||
GameMode="GameModeSurvivalMP";
|
|
||||||
ZombiesRun="0";
|
|
||||||
BuildCreate="false";
|
|
||||||
DayNightLength="60";
|
|
||||||
DayLightLength="18";
|
|
||||||
PlayerKillingMode="3";
|
|
||||||
PersistentPlayerProfiles="false";
|
|
||||||
PlayerSafeZoneLevel="5";
|
|
||||||
PlayerSafeZoneHours="5";
|
|
||||||
ControlPanelEnabled="false";
|
|
||||||
ControlPanelPort="8080";
|
|
||||||
ControlPanelPassword="CHANGEME";
|
|
||||||
TelnetEnabled="false";
|
|
||||||
TelnetPort="8081";
|
|
||||||
TelnetPassword="";
|
|
||||||
AdminFileName="serveradmin.xml";
|
|
||||||
DropOnDeath="0";
|
|
||||||
DropOnQuit="0";
|
|
||||||
BloodMoonEnemyCount="8";
|
|
||||||
EnemySpawnMode="true";
|
|
||||||
EnemyDifficulty="0";
|
|
||||||
BlockDurabilityModifier="100";
|
|
||||||
LootAbundance="100";
|
|
||||||
LootRespawnDays="30";
|
|
||||||
LandClaimSize="41";
|
|
||||||
LandClaimDeadZone="30";
|
|
||||||
LandClaimExpiryTime="3";
|
|
||||||
LandClaimDecayMode="0";
|
|
||||||
LandClaimOnlineDurabilityModifier="4";
|
|
||||||
LandClaimOfflineDurabilityModifier="4";
|
|
||||||
AirDropFrequency="72";
|
|
||||||
AirDropMarker="false";
|
|
||||||
MaxSpawnedZombies="60";
|
|
||||||
MaxSpawnedAnimals="50";
|
|
||||||
EACEnabled="true";
|
|
||||||
HideCommandExecutionLog="0";
|
|
||||||
MaxUncoveredMapChunksPerPlayer="131072";
|
|
||||||
BedrollDeadZoneSize="15";
|
|
||||||
};
|
|
||||||
gameConfig = builtins.toFile "serverconfig.xml" ''
|
|
||||||
<?xml version="1.0"?>
|
|
||||||
<ServerSettings>
|
|
||||||
${concatStrings (
|
|
||||||
mapAttrsToList (name: value:
|
|
||||||
" <property name=\"${name}\" value=\"${value}\"/>\n"
|
|
||||||
) gameOptions)}
|
|
||||||
</ServerSettings>
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.services.sdtdserver = {
|
|
||||||
enable = mkEnableOption "Activation du serveur dédié 7 Days to Die";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
|
|
||||||
systemd.services.sdtdserver = {
|
|
||||||
description = "Serveur dédié 7 Days to Die";
|
|
||||||
requires = ["network-online.target"];
|
|
||||||
wantedBy = ["multi-user.target"];
|
|
||||||
environment = { HOME = gamePath; };
|
|
||||||
serviceConfig = {
|
|
||||||
DynamicUser = true;
|
|
||||||
StateDirectory = "sdtdserver";
|
|
||||||
};
|
|
||||||
preStart = let
|
|
||||||
libPath = with pkgs; lib.makeLibraryPath [
|
|
||||||
stdenv.cc.cc.lib
|
|
||||||
];
|
|
||||||
in ''
|
|
||||||
${pkgs.steamcmd}/bin/steamcmd +login anonymous +force_install_dir ${gamePath} +app_update 294420 validate +quit
|
|
||||||
${pkgs.patchelf}/bin/patchelf \
|
|
||||||
--set-interpreter "$(cat ${pkgs.gcc}/nix-support/dynamic-linker)" \
|
|
||||||
--set-rpath "${libPath}" \
|
|
||||||
${gamePath}/7DaysToDieServer.x86_64
|
|
||||||
install -m666 ${gameConfig} ${gamePath}/serverconfig.xml
|
|
||||||
'';
|
|
||||||
script = ''
|
|
||||||
${gamePath}/7DaysToDieServer.x86_64 -quit -batchmode -nographics -dedicated -configfile=serverconfig.xml
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.firewall = {
|
|
||||||
allowedTCPPorts = [ 26900 ];
|
|
||||||
allowedUDPPorts = [ 26900 26901 26902 ];
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -5,7 +5,7 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
gitRev = "17d85e2162f7a65d8515626692d2ae55226d4680";
|
gitRev = "b9c2a5800f8d42cedf0545663187597f73ca2b51";
|
||||||
nixpkgs = fetchTarball "https://github.com/nyanloutre/nixpkgs/archive/${gitRev}.tar.gz";
|
nixpkgs = fetchTarball "https://github.com/nyanloutre/nixpkgs/archive/${gitRev}.tar.gz";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -19,7 +19,6 @@ in
|
|||||||
../../services/site-max.nix
|
../../services/site-max.nix
|
||||||
../../services/auto-pr.nix
|
../../services/auto-pr.nix
|
||||||
../../services/python-ci.nix
|
../../services/python-ci.nix
|
||||||
../../services/sdtdserver.nix
|
|
||||||
../../containers/vsftpd.nix
|
../../containers/vsftpd.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -361,8 +360,6 @@ in
|
|||||||
auto-pr.enable = true;
|
auto-pr.enable = true;
|
||||||
|
|
||||||
python-ci.enable = true;
|
python-ci.enable = true;
|
||||||
|
|
||||||
sdtdserver.enable = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user