Skip to content

Commit 1d3c4c5

Browse files
committed
Apply suggestions from aidalgol#14
1 parent 3f2ff79 commit 1d3c4c5

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

nixos-modules/valheim.nix

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -72,24 +72,8 @@ in {
7272
'';
7373
};
7474

75-
logFile = lib.mkOption {
76-
type = with lib.types; nullOr str;
77-
default = null;
78-
example = "/var/lib/valheim/log/valheim-server.log";
79-
description = lib.mdDoc ''
80-
The path where the server log file will be saved.
81-
82-
When set, this will redirect all logs from stdout to the specified path.
83-
This means that the logs will not be captured by systemd's journal.
84-
Leave this option unset to keep console logging enabled.
85-
86-
Make sure the valheim user has write access to the specified directory, otherwise
87-
the valheim service fail to start and exit.
88-
'';
89-
};
90-
9175
preset = lib.mkOption {
92-
type = with lib.types; nullOr str;
76+
type = with lib.types; nullOr (enum ["easy" "hard" "hardcore" "casual" "hammer" "immersive"]);
9377
default = null;
9478
example = "hardcore";
9579
description = lib.mdDoc ''
@@ -317,7 +301,6 @@ in {
317301
"-public ${if cfg.public then "1" else "0"}"
318302
]
319303
++ (lib.lists.optional cfg.crossplay "-crossplay")
320-
++ (lib.lists.optional (cfg.logFile != null) "-logFile \"${cfg.logFile}\"")
321304
++ (lib.lists.optional (cfg.preset != null) "-preset \"${cfg.preset}\""));
322305
};
323306
};

0 commit comments

Comments
 (0)