enable vaheim
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
wget curl vim nano zsh fzf tmux git exa progress tldr htop
|
wget curl vim nano zsh fzf tmux git exa progress tldr htop steamcmd
|
||||||
];
|
];
|
||||||
|
|
||||||
imports =
|
imports =
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
#./7dtd.nix
|
#./7dtd.nix
|
||||||
|
./vaheim.nix
|
||||||
./sshd.nix
|
./sshd.nix
|
||||||
./teamspeak.nix
|
./teamspeak.nix
|
||||||
./nginx.nix
|
./nginx.nix
|
||||||
|
|||||||
32
services/vaheim.nix
Normal file
32
services/vaheim.nix
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
runEnv = (pkgs.buildFHSUserEnv {
|
||||||
|
name = "vaheim-env";
|
||||||
|
targetPkgs = pkgs: (with pkgs;
|
||||||
|
[
|
||||||
|
]);
|
||||||
|
runScript = "bash start_server.sh";
|
||||||
|
});
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [2456 2457 2458];
|
||||||
|
networking.firewall.allowedUDPPorts = [2456 2457 2458];
|
||||||
|
|
||||||
|
systemd.services.vaheim = {
|
||||||
|
description = "vaheim";
|
||||||
|
after = [ "network.target" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
User = "sshuser";
|
||||||
|
Group = "users";
|
||||||
|
WorkingDirectory = "/home/sshuser/.steam/root/valheim";
|
||||||
|
ExecStart = "${runEnv}/bin/vaheim-env";
|
||||||
|
Restart = "always";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user