feat: zomboid to neuro
This commit is contained in:
@@ -19,6 +19,8 @@ in self.lib.nixpkgs-lib.nixosSystem {
|
||||
self.lib.cudaUnfreePredicate pkg || builtins.elem (self.lib.nixpkgs-lib.getName pkg) [
|
||||
"minecraft-server"
|
||||
"neoforge"
|
||||
"steamcmd"
|
||||
"steam-unwrapped"
|
||||
|
||||
"nvidia-x11"
|
||||
"nvidia-kernel-modules"
|
||||
|
||||
@@ -71,6 +71,7 @@ in {
|
||||
self.nixosModules.hectic
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
./minecraft
|
||||
./project-zomboid.nix
|
||||
./wowmine-web.nix
|
||||
./hardware.nix
|
||||
];
|
||||
|
||||
@@ -0,0 +1,315 @@
|
||||
{
|
||||
"AbundantLootFactor": 3,
|
||||
"Alarm": 4,
|
||||
"AlarmDecay": 2,
|
||||
"AlarmDecayModifier": 14,
|
||||
"AllClothesUnlocked": false,
|
||||
"AllowExteriorGenerator": true,
|
||||
"AmmoLootNew": 0.6,
|
||||
"AnimalAgeModifier": 4,
|
||||
"AnimalEggHatch": 4,
|
||||
"AnimalGrassRegrowTime": 240,
|
||||
"AnimalMatingSeason": true,
|
||||
"AnimalMetaPredator": false,
|
||||
"AnimalMetaStatsModifier": 4,
|
||||
"AnimalMilkIncModifier": 4,
|
||||
"AnimalPathChance": 4,
|
||||
"AnimalPregnancyTime": 4,
|
||||
"AnimalRanchChance": 5,
|
||||
"AnimalSoundAttractZombies": true,
|
||||
"AnimalStatsModifier": 4,
|
||||
"AnimalTrackChance": 4,
|
||||
"AnimalWoolIncModifier": 4,
|
||||
"AnnotatedMapChance": 4,
|
||||
"AttackBlockMovements": true,
|
||||
"Basement": {
|
||||
"SpawnFrequency": 4
|
||||
},
|
||||
"BloodLevel": 3,
|
||||
"BloodSplatLifespanDays": 0,
|
||||
"BoneFracture": true,
|
||||
"CannedFoodLootNew": 0.6,
|
||||
"CarAlarm": 3,
|
||||
"CarDamageOnImpact": 3,
|
||||
"CarGasConsumption": 1,
|
||||
"CarGeneralCondition": 3,
|
||||
"CarSpawnRate": 3,
|
||||
"ChanceHasGas": 2,
|
||||
"CharacterFreePoints": 0,
|
||||
"ClayLakeChance": 0.05,
|
||||
"ClayRiverChance": 0.05,
|
||||
"ClimateCycle": 1,
|
||||
"ClothingDegradation": 3,
|
||||
"ClothingLootNew": 0.6,
|
||||
"CommonLootFactor": 2,
|
||||
"CompostTime": 2,
|
||||
"ConstructionBonusPoints": 3,
|
||||
"ConstructionPreventsLootRespawn": true,
|
||||
"ContainerLootNew": 0.6,
|
||||
"CookwareLootNew": 0.6,
|
||||
"DamageToPlayerFromHitByACar": 1,
|
||||
"DayLength": 4,
|
||||
"DayNightCycle": 1,
|
||||
"DaysForRottenFoodRemoval": -1,
|
||||
"DaysUntilMaximumDiminishedLoot": 3650,
|
||||
"DaysUntilMaximumLooted": 90,
|
||||
"DaysUntilMaximumRatIndex": 90,
|
||||
"DecayingCorpseHealthImpact": 3,
|
||||
"DiscomfortFactor": 0.8,
|
||||
"Distribution": 1,
|
||||
"EasyClimbing": false,
|
||||
"ElecShut": 3,
|
||||
"ElecShutModifier": 150,
|
||||
"EnablePoisoning": 1,
|
||||
"EnableSnowOnGround": true,
|
||||
"EnableTaintedWaterText": true,
|
||||
"EnableVehicles": true,
|
||||
"EndRegen": 3,
|
||||
"ErosionDays": 0,
|
||||
"ErosionSpeed": 4,
|
||||
"ExtremeLootFactor": 0.2,
|
||||
"Farming": 3,
|
||||
"FarmingAmountNew": 1,
|
||||
"FarmingLootNew": 0.6,
|
||||
"FarmingSpeedNew": 1,
|
||||
"FireSpread": true,
|
||||
"FirearmHeadGearEffect": true,
|
||||
"FirearmJamMultiplier": 1,
|
||||
"FirearmMoodleMultiplier": 1,
|
||||
"FirearmNoiseMultiplier": 1,
|
||||
"FirearmUseDamageChance": 2,
|
||||
"FirearmWeatherMultiplier": 1,
|
||||
"FishAbundance": 2,
|
||||
"FogCycle": 1,
|
||||
"FoodLootNew": 0.8,
|
||||
"FoodRotSpeed": 3,
|
||||
"FridgeFactor": 3,
|
||||
"FuelStationGasEmptyChance": 20,
|
||||
"FuelStationGasInfinite": false,
|
||||
"FuelStationGasMax": 0.8,
|
||||
"FuelStationGasMin": 0,
|
||||
"GeneratorFuelConsumption": 0.1,
|
||||
"GeneratorSpawning": 4,
|
||||
"GeneratorTileRange": 20,
|
||||
"GeneratorVerticalPowerRange": 3,
|
||||
"Helicopter": 2,
|
||||
"HoursForCorpseRemoval": 216,
|
||||
"HoursForLootRespawn": 0,
|
||||
"HoursForWorldItemRemoval": 24,
|
||||
"InitialGas": 2,
|
||||
"InjurySeverity": 2,
|
||||
"InsaneLootFactor": 0.05,
|
||||
"ItemRemovalListBlacklistToggle": false,
|
||||
"KeyLootNew": 0.4,
|
||||
"KillInsideCrops": true,
|
||||
"LevelForDismantleXPCutoff": 0,
|
||||
"LevelForMediaXPCutoff": 3,
|
||||
"LightBulbLifespan": 2,
|
||||
"LiteratureCooldown": 45,
|
||||
"LiteratureLootNew": 0.6,
|
||||
"LockedCar": 4,
|
||||
"LockedHouses": 6,
|
||||
"LootItemRemovalList": "",
|
||||
"LuaDigitalWatchUI": {
|
||||
"MinuteResolution": 1
|
||||
},
|
||||
"MaggotSpawn": 1,
|
||||
"Map": {
|
||||
"AllowMiniMap": false,
|
||||
"AllowWorldMap": true,
|
||||
"MapAllKnown": false,
|
||||
"MapNeedsLight": true
|
||||
},
|
||||
"MaterialLootNew": 0.6,
|
||||
"MaxFogIntensity": 1,
|
||||
"MaxItemsForLootRespawn": 5,
|
||||
"MaxRainFxIntensity": 1,
|
||||
"MaximumDiminishedLoot": 20,
|
||||
"MaximumFireFuelHours": 8,
|
||||
"MaximumLooted": 25,
|
||||
"MaximumLootedBuildingRooms": 50,
|
||||
"MaximumRatIndex": 25,
|
||||
"MechanicsLootNew": 0.6,
|
||||
"MediaLootNew": 0.6,
|
||||
"MedicalLootNew": 0.6,
|
||||
"MementoLootNew": 0.6,
|
||||
"MetaEvent": 2,
|
||||
"MetaKnowledge": 3,
|
||||
"MinutesPerPage": 0.5,
|
||||
"MultiHitZombies": false,
|
||||
"MultiplierConfig": {
|
||||
"Aiming": 1,
|
||||
"Axe": 1,
|
||||
"Blacksmith": 1,
|
||||
"Blunt": 1,
|
||||
"Butchering": 1,
|
||||
"Carving": 1,
|
||||
"Cooking": 1,
|
||||
"Doctor": 1,
|
||||
"Electricity": 1,
|
||||
"Farming": 1,
|
||||
"Fishing": 1,
|
||||
"Fitness": 1,
|
||||
"FlintKnapping": 1,
|
||||
"Glassmaking": 1,
|
||||
"Global": 1,
|
||||
"GlobalToggle": true,
|
||||
"Husbandry": 1,
|
||||
"Lightfoot": 1,
|
||||
"LongBlade": 1,
|
||||
"Maintenance": 1,
|
||||
"Masonry": 1,
|
||||
"Mechanics": 1,
|
||||
"MetalWelding": 1,
|
||||
"Nimble": 1,
|
||||
"PlantScavenging": 1,
|
||||
"Pottery": 1,
|
||||
"Reloading": 1,
|
||||
"SmallBlade": 1,
|
||||
"SmallBlunt": 1,
|
||||
"Sneak": 1,
|
||||
"Spear": 1,
|
||||
"Sprinting": 1,
|
||||
"Strength": 1,
|
||||
"Tailoring": 1,
|
||||
"Tracking": 1,
|
||||
"Trapping": 1,
|
||||
"Woodwork": 1
|
||||
},
|
||||
"MuscleStrainFactor": 0.7,
|
||||
"NatureAbundance": 3,
|
||||
"NegativeTraitsPenalty": 1,
|
||||
"NightDarkness": 3,
|
||||
"NightLength": 3,
|
||||
"NoBlackClothes": true,
|
||||
"NormalLootFactor": 1,
|
||||
"Nutrition": true,
|
||||
"OtherLootNew": 0.8,
|
||||
"PlaceDirtAboveground": false,
|
||||
"PlantAbundance": 3,
|
||||
"PlantGrowingSeasons": true,
|
||||
"PlantResilience": 3,
|
||||
"PlayerDamageFromCrash": true,
|
||||
"Rain": 3,
|
||||
"RangedWeaponLootNew": 1.2,
|
||||
"RareLootFactor": 0.6,
|
||||
"RealisticCold": {
|
||||
"BreachWeightCurtain": 0.3,
|
||||
"BreachWeightDoor": 1.2,
|
||||
"BreachWeightGap": 1.4,
|
||||
"BreachWeightWindow": 0.8,
|
||||
"CatchColdRateMultiplier": 1.75,
|
||||
"CatchColdThreshold": 2,
|
||||
"ChillyAirThreshold": 16,
|
||||
"ChillyCoolingMultiplierThreshold": 0.9,
|
||||
"ChillyInsulationThreshold": 1.5,
|
||||
"ClothingInsulationScale": 4,
|
||||
"ColdMedicineDecayPerHour": 36,
|
||||
"ColdRecoverPerHour": 24,
|
||||
"ColdSicknessMultiplier": 1,
|
||||
"ColdWorsenPerHour": 45,
|
||||
"ConvectiveBridgeStrength": 1,
|
||||
"EnableFoodFreezingExperimental": false,
|
||||
"EvapCoolingStrength": 1,
|
||||
"ExposureCap": 6,
|
||||
"HeatDistanceExponent": 1,
|
||||
"HeatTargetMaximum": 26,
|
||||
"HypothermiaDamageIntervalMin": 0.2,
|
||||
"HypothermiaDamagePerTick": 0.2,
|
||||
"IndustrialHeaterSpawnRate": 20,
|
||||
"InsulationSpreadBias": 0.3,
|
||||
"SealedPassiveTransferStrength": 1,
|
||||
"SweatRateMultiplier": 1,
|
||||
"VehicleHeaterMaxDelta": 25,
|
||||
"WarmingRateCapCPM": 0.5
|
||||
},
|
||||
"RearVulnerability": 3,
|
||||
"RecentlySurvivorVehicles": 2,
|
||||
"RecipeResourceLoot": 0.6,
|
||||
"RemoveStoryLoot": false,
|
||||
"RemoveZombieLoot": false,
|
||||
"RollsMultiplier": 1,
|
||||
"RuralLooted": 0.5,
|
||||
"SeeNotLearntRecipe": true,
|
||||
"SeenHoursPreventLootRespawn": 0,
|
||||
"SirenEffectsZombies": true,
|
||||
"SirenShutoffHours": 0,
|
||||
"SkillBookLoot": 0.6,
|
||||
"SleepingEvent": 1,
|
||||
"StartDay": 1,
|
||||
"StartMonth": 12,
|
||||
"StartTime": 2,
|
||||
"StartYear": 1,
|
||||
"StarterKit": false,
|
||||
"StatsDecrease": 3,
|
||||
"SurvivalGearsLootNew": 0.6,
|
||||
"SurvivorHouseChance": 3,
|
||||
"Temperature": 3,
|
||||
"TimeSinceApo": 1,
|
||||
"ToolLootNew": 0.6,
|
||||
"TrafficJam": true,
|
||||
"VERSION": 6,
|
||||
"VehicleEasyUse": false,
|
||||
"VehicleStoryChance": 3,
|
||||
"WaterShut": 3,
|
||||
"WaterShutModifier": 150,
|
||||
"WeaponLootNew": 0.6,
|
||||
"WorldItemRemovalList": "Base.Hat, Base.Glasses, Base.Maggots, Base.Slug, Base.Slug2, Base.Snail, Base.Worm, Base.Dung_Mouse, Base.Dung_Rat",
|
||||
"WoundInfectionFactor": 1,
|
||||
"ZombieAttractionMultiplier": 1,
|
||||
"ZombieConfig": {
|
||||
"FollowSoundDistance": 100,
|
||||
"PopulationMultiplier": 1.3,
|
||||
"PopulationPeakDay": 28,
|
||||
"PopulationPeakMultiplier": 1,
|
||||
"PopulationStartMultiplier": 1,
|
||||
"RallyGroupRadius": 3,
|
||||
"RallyGroupSeparation": 15,
|
||||
"RallyGroupSize": 20,
|
||||
"RallyGroupSizeVariance": 50,
|
||||
"RallyTravelDistance": 20,
|
||||
"RedistributeHours": 0,
|
||||
"RespawnHours": 0,
|
||||
"RespawnMultiplier": 0,
|
||||
"RespawnUnseenHours": 0,
|
||||
"ZombiesCountBeforeDelete": 300
|
||||
},
|
||||
"ZombieHealthImpact": false,
|
||||
"ZombieLore": {
|
||||
"ActiveOnly": 1,
|
||||
"ChanceOfAttachedWeapon": 6,
|
||||
"Cognition": 2,
|
||||
"CrawlUnderVehicle": 5,
|
||||
"DisableFakeDead": 1,
|
||||
"DoorOpeningPercentage": 10,
|
||||
"FenceDamageMultiplier": 1,
|
||||
"FenceThumpersRequired": 25,
|
||||
"Hearing": 5,
|
||||
"Memory": 2,
|
||||
"Mortality": 7,
|
||||
"PlayerSpawnZombieRemoval": 1,
|
||||
"Reanimate": 3,
|
||||
"Sight": 5,
|
||||
"Speed": 2,
|
||||
"SpottedLogic": true,
|
||||
"SprinterPercentage": 0,
|
||||
"Strength": 2,
|
||||
"ThumpNoChasing": false,
|
||||
"ThumpOnConstruction": true,
|
||||
"Toughness": 4,
|
||||
"Transmission": 4,
|
||||
"TriggerHouseAlarm": true,
|
||||
"ZombiesArmorFactor": 2,
|
||||
"ZombiesCrawlersDragDown": false,
|
||||
"ZombiesDragDown": true,
|
||||
"ZombiesFallDamage": 1,
|
||||
"ZombiesFenceLunge": true,
|
||||
"ZombiesMaxDefense": 85
|
||||
},
|
||||
"ZombieMigrate": true,
|
||||
"ZombiePopLootEffect": 0,
|
||||
"ZombieRespawn": 4,
|
||||
"ZombieVoronoiNoise": true,
|
||||
"Zombies": 4,
|
||||
"ZoneStoryChance": 3
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
{
|
||||
"AdminSafehouse": "false",
|
||||
"AllowCoop": "true",
|
||||
"AllowDestructionBySledgehammer": "true",
|
||||
"AllowNonAsciiUsername": "false",
|
||||
"AnnounceAnimalDeath": "false",
|
||||
"AnnounceDeath": "false",
|
||||
"AntiCheatChecksum": "4",
|
||||
"AntiCheatHit": "4",
|
||||
"AntiCheatNoClip": "4",
|
||||
"AntiCheatPacketException": "4",
|
||||
"AntiCheatPermission": "4",
|
||||
"AntiCheatPlayer": "4",
|
||||
"AntiCheatSafeHouse": "4",
|
||||
"AntiCheatSafety": "4",
|
||||
"AntiCheatSpeed": "4",
|
||||
"AntiCheatXP": "4",
|
||||
"BackupsCount": "5",
|
||||
"BackupsOnStart": "true",
|
||||
"BackupsOnVersionChange": "true",
|
||||
"BackupsPeriod": "0",
|
||||
"BadWordListFile": "",
|
||||
"BadWordPolicy": "3",
|
||||
"BadWordReplacement": "[HIDDEN]",
|
||||
"BanKickGlobalSound": "true",
|
||||
"BloodSplatLifespanDays": "0",
|
||||
"CarEngineAttractionModifier": "0.5",
|
||||
"ChatMessageCharacterLimit": "200",
|
||||
"ChatMessageSlowModeTime": "3",
|
||||
"ChatStreams": "s,r,a,w,y,sh,f,all",
|
||||
"ClientActionLogs": "ISEnterVehicle;ISExitVehicle;ISTakeEngineParts;",
|
||||
"ClientCommandFilter": "-vehicle.*;+vehicle.damageWindow;+vehicle.fixPart;+vehicle.installPart;+vehicle.uninstallPart",
|
||||
"DefaultPort": "16261",
|
||||
"DenyLoginOnOverloadedServer": "true",
|
||||
"DisableBurntTowing": "false",
|
||||
"DisableRadioAdmin": "true",
|
||||
"DisableRadioGM": "true",
|
||||
"DisableRadioInvisible": "true",
|
||||
"DisableRadioModerator": "false",
|
||||
"DisableRadioOverseer": "false",
|
||||
"DisableRadioStaff": "false",
|
||||
"DisableSafehouseWhenOwnerConnected": "false",
|
||||
"DisableScoreboard": "false",
|
||||
"DisableTrailerTowing": "false",
|
||||
"DisableVehicleTowing": "false",
|
||||
"DiscordChatChannel": "",
|
||||
"DiscordCommandChannel": "",
|
||||
"DiscordEnable": "false",
|
||||
"DiscordLogChannel": "",
|
||||
"DisplayUserName": "true",
|
||||
"DoLuaChecksum": "false",
|
||||
"DropOffWhiteListAfterDeath": "false",
|
||||
"Faction": "true",
|
||||
"FactionDaySurvivedToCreate": "0",
|
||||
"FactionPlayersRequiredForTag": "1",
|
||||
"FastForwardMultiplier": "40.0",
|
||||
"GlobalChat": "true",
|
||||
"GoodWordListFile": "",
|
||||
"HideAdminsInPlayerList": "false",
|
||||
"HideDisguisedUserName": "false",
|
||||
"HidePlayersBehindYou": "true",
|
||||
"ItemNumbersLimitPerContainer": "0",
|
||||
"KnockedDownAllowed": "false",
|
||||
"LoginQueueConnectTimeout": "60",
|
||||
"LoginQueueEnabled": "false",
|
||||
"Map": "Muldraugh, KY",
|
||||
"MapRemotePlayerVisibility": "1",
|
||||
"MaxAccountsPerUser": "0",
|
||||
"MaxPacketsPerSecond": "300",
|
||||
"MaxPlayers": "32",
|
||||
"MaxSafezoneSize": "20000",
|
||||
"Mods": "\\LuaDigitalWatchUI;\\RC_RealisticColdMod",
|
||||
"MouseOverToSeeDisplayName": "true",
|
||||
"MultiplayerStatisticsPeriod": "1",
|
||||
"NoFire": "false",
|
||||
"Open": "true",
|
||||
"PVP": "true",
|
||||
"PVPFirearmDamageModifier": "50.0",
|
||||
"PVPLogToolChat": "true",
|
||||
"PVPLogToolFile": "true",
|
||||
"PVPMeleeDamageModifier": "30.0",
|
||||
"PVPMeleeWhileHitReaction": "false",
|
||||
"PauseEmpty": "true",
|
||||
"PerkLogs": "true",
|
||||
"PingLimit": "0",
|
||||
"PlayerBumpPlayer": "false",
|
||||
"PlayerRespawnWithOther": "false",
|
||||
"PlayerRespawnWithSelf": "false",
|
||||
"PlayerSafehouse": "false",
|
||||
"Public": "true",
|
||||
"PublicDescription": "",
|
||||
"PublicName": "My PZ Server",
|
||||
"RCONPort": "27015",
|
||||
"RemovePlayerCorpsesOnCorpseRemoval": "false",
|
||||
"ResetID": "555407849",
|
||||
"SafeHouseRemovalTime": "144",
|
||||
"SafehouseAllowFire": "true",
|
||||
"SafehouseAllowLoot": "true",
|
||||
"SafehouseAllowNonResidential": "false",
|
||||
"SafehouseAllowRespawn": "false",
|
||||
"SafehouseAllowTrepass": "true",
|
||||
"SafehouseDaySurvivedToClaim": "0",
|
||||
"SafehouseDisableDisguises": "true",
|
||||
"SafehousePreventsLootRespawn": "true",
|
||||
"SafetyCooldownTimer": "3",
|
||||
"SafetyDisconnectDelay": "60",
|
||||
"SafetySystem": "true",
|
||||
"SafetyToggleTimer": "2",
|
||||
"SaveWorldEveryMinutes": "15",
|
||||
"Seed": "EGRdrbkctBhwZiKX",
|
||||
"ServerPlayerID": "630210521",
|
||||
"ServerWelcomeMessage": "Welcome to Project Zomboid Multiplayer! <LINE> <LINE> To interact with the Chat panel: press Tab, T, or Enter. <LINE> <LINE> The Tab key will change the target stream of the message. <LINE> <LINE> Global Streams: /all <LINE> Local Streams: /say, /yell <LINE> Special Steams: /whisper, /safehouse, /faction. <LINE> <LINE> Press the Up arrow to cycle through your message history. Click the Gear icon to customize chat. <LINE> <LINE> Happy surviving!",
|
||||
"ShowCoordinates": "false",
|
||||
"ShowFirstAndLastName": "false",
|
||||
"ShowSafety": "true",
|
||||
"SledgehammerOnlyInSafehouse": "false",
|
||||
"SleepAllowed": "false",
|
||||
"SleepNeeded": "false",
|
||||
"SneakModeHideFromOtherPlayers": "true",
|
||||
"SpawnItems": "",
|
||||
"SpawnPoint": "0,0,0",
|
||||
"SpeedLimit": "70.0",
|
||||
"SteamScoreboard": "false",
|
||||
"SteamVAC": "true",
|
||||
"SwitchZombiesOwnershipEachUpdate": "false",
|
||||
"TrashDeleteAll": "false",
|
||||
"UDPPort": "16262",
|
||||
"UPnP": "true",
|
||||
"UltraSpeedDoesnotAffectToAnimals": "false",
|
||||
"UsePhysicsHitReaction": "false",
|
||||
"UsernameDisguises": "false",
|
||||
"Voice3D": "true",
|
||||
"VoiceEnable": "true",
|
||||
"VoiceMaxDistance": "100.0",
|
||||
"VoiceMinDistance": "10.0",
|
||||
"War": "false",
|
||||
"WarDuration": "3600",
|
||||
"WarSafehouseHitPoints": "3",
|
||||
"WarStartDelay": "600",
|
||||
"WorkshopItems": "3676456221;3600401184",
|
||||
"server_browser_announced_ip": ""
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
# Retain the IDs of neuro's former installation; hectic-lab's UID is occupied.
|
||||
users.users.project-zomboid.uid = 988;
|
||||
users.groups.project-zomboid.gid = 985;
|
||||
|
||||
sops.secrets = {
|
||||
"project-zomboid/s3-access-key" = {
|
||||
sopsFile = ../../../sus/neuro-project-zomboid.yaml;
|
||||
owner = "project-zomboid";
|
||||
group = "project-zomboid";
|
||||
};
|
||||
"project-zomboid/s3-secret-key" = {
|
||||
sopsFile = ../../../sus/neuro-project-zomboid.yaml;
|
||||
owner = "project-zomboid";
|
||||
group = "project-zomboid";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.project-zomboid.preStart = lib.mkBefore ''
|
||||
password_file=${lib.escapeShellArg "/var/lib/project-zomboid/server-password"}
|
||||
properties_file=${lib.escapeShellArg "/var/lib/project-zomboid/server-password.ini"}
|
||||
s3_credentials_file=${lib.escapeShellArg "/var/lib/project-zomboid/s3-credentials"}
|
||||
s3_credentials_tmp="$(${pkgs.coreutils}/bin/mktemp "''${s3_credentials_file}.XXXXXX")"
|
||||
trap '${pkgs.coreutils}/bin/rm -f "$s3_credentials_tmp"' EXIT
|
||||
|
||||
{
|
||||
${pkgs.coreutils}/bin/printf 'AWS_ACCESS_KEY_ID='
|
||||
${pkgs.coreutils}/bin/cat ${lib.escapeShellArg config.sops.secrets."project-zomboid/s3-access-key".path}
|
||||
${pkgs.coreutils}/bin/printf '\n'
|
||||
${pkgs.coreutils}/bin/printf 'AWS_SECRET_ACCESS_KEY='
|
||||
${pkgs.coreutils}/bin/cat ${lib.escapeShellArg config.sops.secrets."project-zomboid/s3-secret-key".path}
|
||||
${pkgs.coreutils}/bin/printf '\n'
|
||||
} > "$s3_credentials_tmp"
|
||||
${pkgs.coreutils}/bin/chmod 0400 "$s3_credentials_tmp"
|
||||
${pkgs.coreutils}/bin/mv -f "$s3_credentials_tmp" "$s3_credentials_file"
|
||||
|
||||
if [ ! -s "$password_file" ] || ! ${pkgs.gnugrep}/bin/grep -Eq '^[0-9a-f]{48}$' "$password_file"; then
|
||||
umask 077
|
||||
${pkgs.openssl}/bin/openssl rand -hex 24 > "$password_file"
|
||||
fi
|
||||
${pkgs.coreutils}/bin/chmod 0600 "$password_file"
|
||||
|
||||
properties_file_tmp="$(${pkgs.coreutils}/bin/mktemp "$(dirname "$properties_file")/.server-password.ini.XXXXXX")"
|
||||
${pkgs.coreutils}/bin/printf 'Password=%s\n' "$(<"$password_file")" > "$properties_file_tmp"
|
||||
${pkgs.coreutils}/bin/chmod 0600 "$properties_file_tmp"
|
||||
${pkgs.coreutils}/bin/mv "$properties_file_tmp" "$properties_file"
|
||||
'';
|
||||
|
||||
hectic.services."project-zomboid" = {
|
||||
enable = true;
|
||||
updateOnStart = false;
|
||||
memory = "4g";
|
||||
serverName = "servertest";
|
||||
port = 36565;
|
||||
udpPort = 36566;
|
||||
serverPropertiesFile = /var/lib/project-zomboid/server-password.ini;
|
||||
rcon.enable = true;
|
||||
|
||||
# These snapshots retain live settings, world identities and mod options.
|
||||
serverProperties = builtins.fromJSON (builtins.readFile ./project-zomboid-server.json) // {
|
||||
server_browser_announced_ip = "95.31.254.84";
|
||||
};
|
||||
sandboxProperties = builtins.fromJSON (builtins.readFile ./project-zomboid-sandbox.json);
|
||||
# Keep the migrated LuaDigitalWatchUI 1.0 and RC_RealisticColdMod 2.2.0
|
||||
# in Zomboid/mods; Workshop would replace the latter on first startup.
|
||||
workshopItems = [ ];
|
||||
mods = [
|
||||
"\\LuaDigitalWatchUI"
|
||||
"\\RC_RealisticColdMod"
|
||||
];
|
||||
|
||||
backup = {
|
||||
enable = true;
|
||||
onCalendar = "*:0/30";
|
||||
retentionDays = 0;
|
||||
s3 = {
|
||||
enable = true;
|
||||
bucket = "backup-hectic-lab";
|
||||
endpoint = "https://hel1.your-objectstorage.com";
|
||||
region = "hel1";
|
||||
credentialsFile = "/var/lib/project-zomboid/s3-credentials";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user