mirror of
https://codeberg.org/muon/home.git
synced 2025-12-05 23:57:46 +00:00
27 lines
788 B
Nix
27 lines
788 B
Nix
{ pkgs, lib, config, inputs, sources, ... }: {
|
|
options.mods.unfree.valheim = {
|
|
enable = lib.mkEnableOption {
|
|
default = false;
|
|
description = "enables valheim server";
|
|
};
|
|
packages = lib.mkOption {
|
|
default = [ "valheim-server" "steamworks-sdk-redist" ];
|
|
description = "unfree packages";
|
|
};
|
|
};
|
|
|
|
imports = [ inputs.valheim-server.nixosModules.default ];
|
|
|
|
config = lib.mkIf config.mods.unfree.valheim.enable {
|
|
services.valheim = {
|
|
enable = true;
|
|
serverName = "Smorld";
|
|
worldName = "Smorld";
|
|
openFirewall = true;
|
|
password = "notbeempty";
|
|
bepinexMods = lib.mapAttrsToList (name: value: value.src)
|
|
(lib.attrsets.filterAttrs (n: v: lib.strings.hasPrefix "valheim." n)
|
|
sources);
|
|
};
|
|
};
|
|
}
|