From e5335939c569bae019e23b59669efe17651bed70 Mon Sep 17 00:00:00 2001 From: stubbfel Date: Sun, 24 May 2020 17:18:09 +0200 Subject: [PATCH] update 2020.3 --- configuration.nix | 8 +++++- i18n.nix | 6 ++--- module/news2kindle/news2kindle.nix | 2 +- programs/installed.nix | 2 +- services/7dtd.nix | 42 ++++++++++++++++++++++++++++++ services/enabled.nix | 1 + services/nextcloud.nix | 2 +- services/nginx.nix | 2 +- services/teamspeak.nix | 6 ++--- 9 files changed, 59 insertions(+), 12 deletions(-) create mode 100644 services/7dtd.nix diff --git a/configuration.nix b/configuration.nix index ae93c10..19be1cd 100644 --- a/configuration.nix +++ b/configuration.nix @@ -29,6 +29,12 @@ # should. system = { stateVersion = "17.09"; # Did you read the comment? - autoUpgrade.enable = true; + autoUpgrade = { + enable = true; + allowReboot = true; + }; }; + + security.acme.email = "stubbfel@posteo.de"; + security.acme.acceptTerms = true; } diff --git a/i18n.nix b/i18n.nix index ea31ed4..4805e9a 100644 --- a/i18n.nix +++ b/i18n.nix @@ -2,10 +2,8 @@ { # Select internationalisation properties. - i18n = { - consoleKeyMap = "de"; - defaultLocale = "de_DE.UTF-8"; - }; + i18n.defaultLocale = "de_DE.UTF-8"; + console.keyMap= "de"; # Set your time zone. time.timeZone = "Europe/Amsterdam"; diff --git a/module/news2kindle/news2kindle.nix b/module/news2kindle/news2kindle.nix index c9f3d5d..280f53e 100644 --- a/module/news2kindle/news2kindle.nix +++ b/module/news2kindle/news2kindle.nix @@ -71,7 +71,7 @@ calibreWithRecipes = pkgs.calibre.overrideAttrs (oldAttrs: rec { cp -ravf recipes $out/var/news2kindle ''+ oldAttrs.installPhase ; - buildInputs = (remove pkgs.python2Packages.odfpy oldAttrs.buildInputs) ++ [odfpyNoTest]; + buildInputs = (remove pkgs.python2Packages.odfpy oldAttrs.buildInputs) ++ [odfpyNoTest pkgs.python27Packages.feedparser]; # patches = oldAttrs.patches ++ [./calibre-disable_plugins.patch]; # patches = [./calibre-disable_plugins.patch]; diff --git a/programs/installed.nix b/programs/installed.nix index 8d6d87d..60b72a7 100644 --- a/programs/installed.nix +++ b/programs/installed.nix @@ -2,7 +2,7 @@ { environment.systemPackages = with pkgs; [ - wget curl vim nano zsh fzf tmux git exa progress tldr + wget curl vim nano zsh fzf tmux git exa progress tldr steamcmd ]; imports = diff --git a/services/7dtd.nix b/services/7dtd.nix new file mode 100644 index 0000000..ad3615a --- /dev/null +++ b/services/7dtd.nix @@ -0,0 +1,42 @@ +{ config, pkgs, ... }: + +let + + runEnv = (pkgs.buildFHSUserEnv { + name = "7dtd-env"; + targetPkgs = pkgs: (with pkgs; + [ + ]); + runScript = "bash startserver.sh -configfile=serverconfig.xml"; + }); + +in +{ + + networking.firewall.allowedTCPPorts = [26900]; + networking.firewall.allowedUDPPorts = [26900 26901 26902]; +#7DaysToDie.stubbe.rocks + +# services.nginx.virtualHosts."7daystodie.stubbe.rocks" = { +# enableACME = true; +# forceSSL = false; +# locations."/".proxyPass = "http://localhost:8085"; +# }; + + systemd.services.sdtd = { + description = "7dtd"; + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + Type = "simple"; + User = "sshuser"; + Group = "users"; + WorkingDirectory = "/home/sshuser/SteamCMD7_Days_to_Die_server"; + ExecStart = "${runEnv}/bin/7dtd-env"; + Restart = "always"; + }; + }; + + +} + diff --git a/services/enabled.nix b/services/enabled.nix index f5c2cfc..5c301d8 100644 --- a/services/enabled.nix +++ b/services/enabled.nix @@ -3,6 +3,7 @@ { imports = [ + ./7dtd.nix ./sshd.nix ./teamspeak.nix ./nginx.nix diff --git a/services/nextcloud.nix b/services/nextcloud.nix index 0fd1280..61a2052 100644 --- a/services/nextcloud.nix +++ b/services/nextcloud.nix @@ -2,7 +2,7 @@ { - environment.systemPackages = with pkgs; [ nextcloud ]; + environment.systemPackages = with pkgs; [ nextcloud18 ]; services.nginx.virtualHosts."cloud.stubbe.rocks" = { enableACME = true; diff --git a/services/nginx.nix b/services/nginx.nix index 28eae36..eff519d 100644 --- a/services/nginx.nix +++ b/services/nginx.nix @@ -3,7 +3,7 @@ { -networking.firewall.allowedTCPPorts = [80 443]; +networking.firewall.allowedTCPPorts = [80 443 ]; services.nginx = { appendHttpConfig= ''server_names_hash_bucket_size 64;''; diff --git a/services/teamspeak.nix b/services/teamspeak.nix index 0742a89..8fc3db6 100644 --- a/services/teamspeak.nix +++ b/services/teamspeak.nix @@ -12,9 +12,9 @@ in 9987 # ts port ]; -# nixpkgs.config.packageOverrides = pkgs: { -# teamspeak_server = unstable.teamspeak_server; -# }; + nixpkgs.config.packageOverrides = pkgs: { + teamspeak_server = unstable.teamspeak_server; + }; services.teamspeak3= { enable = true;