From f508c5f5d944c4017a69b895cd644c283fcd6527 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Fri, 12 Jul 2024 19:31:43 +0200 Subject: [PATCH] terraria --- home-manager/hyprland/hyprland-settings.nix | 2 +- modules/services/default.nix | 1 + modules/services/games/default.nix | 2 +- modules/services/games/terraria.nix | 22 +++++++++++++++++++++ systems/mini-pc-proxmox/configuration.nix | 1 + 5 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 modules/services/games/terraria.nix diff --git a/home-manager/hyprland/hyprland-settings.nix b/home-manager/hyprland/hyprland-settings.nix index 3aac64e..bba4f61 100644 --- a/home-manager/hyprland/hyprland-settings.nix +++ b/home-manager/hyprland/hyprland-settings.nix @@ -56,7 +56,7 @@ in { touchpad = { natural_scroll = true; }; - sensitivity = if osConfig.networking.hostName == "kop-pc" then -0.1 else 0; # -1.0 - 1.0, 0 means no modification. + sensitivity = if osConfig.networking.hostName == "kop-pc" then -0.3 else 0; # -1.0 - 1.0, 0 means no modification. }; general = { diff --git a/modules/services/default.nix b/modules/services/default.nix index 8d48d9c..bcaff1e 100644 --- a/modules/services/default.nix +++ b/modules/services/default.nix @@ -6,6 +6,7 @@ ./opensnitch.nix ./adguard.nix ./dnsmasq.nix + ./games ./gitolite.nix ./ente.nix ./kubernetes.nix diff --git a/modules/services/games/default.nix b/modules/services/games/default.nix index 59e291a..31f675b 100644 --- a/modules/services/games/default.nix +++ b/modules/services/games/default.nix @@ -1,6 +1,6 @@ { pkgs, config, ...}: { imports = [ - + ./terraria.nix ]; } diff --git a/modules/services/games/terraria.nix b/modules/services/games/terraria.nix new file mode 100644 index 0000000..bb6317f --- /dev/null +++ b/modules/services/games/terraria.nix @@ -0,0 +1,22 @@ +{ config, pkgs, lib, inputs, ... }: +let + cfg = config.custom.services.terraria; +in +{ + options.custom.services.terraria = { + enable = lib.mkEnableOption "Enables terraria server"; + path = lib.mkOption { + type = with lib.types; string; + default = "/data/servers/terraria"; + description = "Base path for terraria server"; + }; + }; + config = lib.mkIf cfg.enable { + services.terraria = { + enable = true; + openFirewall = true; + password = "seas"; + dataDir = cfg.path; + }; + }; +} diff --git a/systems/mini-pc-proxmox/configuration.nix b/systems/mini-pc-proxmox/configuration.nix index f617ac6..9461dbc 100644 --- a/systems/mini-pc-proxmox/configuration.nix +++ b/systems/mini-pc-proxmox/configuration.nix @@ -90,6 +90,7 @@ enable = true; basePath = "/data/synced"; }; + terraria.enable = true; }; nftables.enable = true; cli-tools.enable = true;