Skip to content
This repository was archived by the owner on Feb 2, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions nixos-modules/valheim.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ in {
options.services.valheim = {
enable = lib.mkEnableOption (lib.mdDoc "Valheim Dedicated Server");

extraArgs = lib.mkOption {
type = with lib.types; listOf str;
default = [];
example = [
"-modifier deathpenalty casual"
"-modifier raids none"
];
description = lib.mdDoc "List of additional args to pass into valheim server binary. Can be used to add world modifiers";
};

serverName = lib.mkOption {
type = lib.types.str;
default = "";
Expand Down Expand Up @@ -273,6 +283,7 @@ in {
"${valheimServerPkg}/bin/valheim-server"
"-name \"${cfg.serverName}\""
]
++ cfg.extraArgs
++ (lib.lists.optional (cfg.worldName != null) "-world \"${cfg.worldName}\"")
++ [
"-port \"${builtins.toString cfg.port}\""
Expand Down
4 changes: 2 additions & 2 deletions pkgs/valheim-server/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ stdenv.mkDerivation (finalAttrs: {
inherit (finalAttrs) name;
appId = "896660";
depotId = "896661";
manifestId = "954348737509367672";
hash = "sha256-0OsgfcpljjYOSeaNgpboOSsh/176i4ubBw1WuljEdeY=";
manifestId = "7872048626245078252";
hash = "sha256-d1UbkdrTzu/TOjzND9F1iG9Jz8a850wtED+Id52qQcI=";
};

# Skip phases that don't apply to prebuilt binaries.
Expand Down