From eaf0c9e9559751a05000c4f21fa97a66ef13a244 Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Thu, 3 Jan 2019 10:04:35 +0100 Subject: [PATCH 1/7] configuration serveur Factorio --- systems/LoutreOS/hardware-configuration.nix | 5 +++++ systems/LoutreOS/services.nix | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/systems/LoutreOS/hardware-configuration.nix b/systems/LoutreOS/hardware-configuration.nix index a093111..e72ceb1 100644 --- a/systems/LoutreOS/hardware-configuration.nix +++ b/systems/LoutreOS/hardware-configuration.nix @@ -117,6 +117,11 @@ fsType = "zfs"; }; + fileSystems."/var/lib/factorio" = + { device = "loutrepool/var/factorio"; + fsType = "zfs"; + }; + fileSystems."/var/dkim" = { device = "loutrepool/var/dkim"; fsType = "zfs"; diff --git a/systems/LoutreOS/services.nix b/systems/LoutreOS/services.nix index f246a1e..0539a30 100644 --- a/systems/LoutreOS/services.nix +++ b/systems/LoutreOS/services.nix @@ -21,6 +21,7 @@ in ../../services/python-ci.nix ../../services/sdtdserver.nix ../../containers/vsftpd.nix + /mnt/secrets/factorio_secrets.nix ]; nixpkgs.overlays = [ @@ -363,6 +364,14 @@ in python-ci.enable = true; sdtdserver.enable = true; + + factorio = { + enable = true; + autosave-interval = 10; + game-name = "Shame"; + public = true; + username = "nyanloutre"; + }; }; /* From b4f345b1c59405ad91877775f014895cc7a8f114 Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Tue, 22 Jan 2019 11:03:01 +0100 Subject: [PATCH 2/7] =?UTF-8?q?cr=C3=A9ation=20site=20Factorio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- systems/LoutreOS/services.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/systems/LoutreOS/services.nix b/systems/LoutreOS/services.nix index 0539a30..fa6a9f3 100644 --- a/systems/LoutreOS/services.nix +++ b/systems/LoutreOS/services.nix @@ -9,6 +9,7 @@ let pgmanage_port = 52347; max_port = 52348; musique_port = 52349; + factorio_port = 52351; in { @@ -60,6 +61,7 @@ in "pgmanage.${domaine}" = { ip = "127.0.0.1"; port = pgmanage_port; auth = true; }; "gitea.${domaine}" = { ip = "127.0.0.1"; port = 3001; auth = false; }; "ci.${domaine}" = { ip = "127.0.0.1"; port = 52350; auth = false; }; + "factorio.${domaine}" = { ip = "127.0.0.1"; port = factorio_port; auth = false; }; }; }; @@ -210,6 +212,10 @@ in listen = [ { addr = "127.0.0.1"; port = riot_port; } ]; locations = { "/" = { root = pkgs.riot-web; }; }; }; + "factorio" = { + listen = [ { addr = "127.0.0.1"; port = factorio_port; } ]; + locations = { "/" = { root = "/var/www/factorio"; }; }; + }; }; }; From a158ee98d850855ba901d7d46c2faf188ad5a891 Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Tue, 22 Jan 2019 11:03:32 +0100 Subject: [PATCH 3/7] =?UTF-8?q?d=C3=A9sactivation=20server=207=20days=20to?= =?UTF-8?q?=20die?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- systems/LoutreOS/services.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systems/LoutreOS/services.nix b/systems/LoutreOS/services.nix index fa6a9f3..a2a24c2 100644 --- a/systems/LoutreOS/services.nix +++ b/systems/LoutreOS/services.nix @@ -369,7 +369,7 @@ in python-ci.enable = true; - sdtdserver.enable = true; + sdtdserver.enable = false; factorio = { enable = true; From 26b53b57f627c79d5c97c21bbdba9a205e8210d4 Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Tue, 22 Jan 2019 11:03:15 +0100 Subject: [PATCH 4/7] activation sauvegardes --- systems/LoutreOS/services.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/systems/LoutreOS/services.nix b/systems/LoutreOS/services.nix index a2a24c2..5ef3e92 100644 --- a/systems/LoutreOS/services.nix +++ b/systems/LoutreOS/services.nix @@ -290,7 +290,6 @@ in }; }; - /* borgbackup.jobs = { loutre = { paths = [ @@ -326,12 +325,11 @@ in postHook = '' ${pkgs.zfs}/bin/zfs destroy loutrepool/var/postgresql@borgsnap if [[ $exitStatus == 0 ]]; then - ${pkgs.rclone}/bin/rclone --config /mnt/secrets/rclone_loutre.conf sync -v $BORG_REPO loutre_ovh:loutre + ${pkgs.rclone}/bin/rclone --config /mnt/secrets/rclone_loutre.conf sync -v $BORG_REPO BackupStorage:loutre fi ''; }; }; - */ borgbackup.repos = { diskstation = { From 8576f0eb84a4b0361ad3d31b54c9b8a085ab1cb3 Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Tue, 22 Jan 2019 11:01:25 +0100 Subject: [PATCH 5/7] activation dogetipbot telegram --- overlays/dogetipbot-telegram.nix | 4 ++-- systems/LoutreOS/services.nix | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/overlays/dogetipbot-telegram.nix b/overlays/dogetipbot-telegram.nix index 9bc16e0..c3462a5 100644 --- a/overlays/dogetipbot-telegram.nix +++ b/overlays/dogetipbot-telegram.nix @@ -3,7 +3,7 @@ self: super: { dogetipbot-telegram = super.callPackage (super.fetchgit { url = "https://gitlab.com/nyanloutre/dogetipbot-telegram.git"; - rev = "3bf1c89aaccded42ce41452c72f7ebf6d4d056ca"; - sha256 = "1gd1wi054ihbxanvj1ac7mz5ghnxab89a0r3i4hy482sglbxqcih"; + rev = "33e5a2273cc1e447dec9a37676913915706fd332"; + sha256 = "1rzv5qd7bj1dzx5qa2h4mdzzvxk77hz3svfcg7hq0sff8a7npk46"; }) { pkgs = self; }; } diff --git a/systems/LoutreOS/services.nix b/systems/LoutreOS/services.nix index 5ef3e92..63081a1 100644 --- a/systems/LoutreOS/services.nix +++ b/systems/LoutreOS/services.nix @@ -378,7 +378,6 @@ in }; }; - /* systemd.services.dogetipbot-telegram = { after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; @@ -386,11 +385,9 @@ in enable = true; serviceConfig = { EnvironmentFile = "/mnt/secrets/dogetipbot-telegram_env"; - User = "nobody"; - Group = "nogroup"; + DynamicUser = true; }; }; - */ systemd.services.matrix-synapse = { serviceConfig = { From 4a1de9e6f61560f799cf1a98469dc6e9ed06b670 Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Tue, 22 Jan 2019 11:02:11 +0100 Subject: [PATCH 6/7] maj mailserver module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Désactivation socket rspamd --- services/mail-server.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/mail-server.nix b/services/mail-server.nix index 13fca17..bcfa591 100644 --- a/services/mail-server.nix +++ b/services/mail-server.nix @@ -17,8 +17,8 @@ in imports = [ (builtins.fetchTarball { - url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/v2.2.0/nixos-mailserver-v2.2.0.tar.gz"; - sha256 = "0gqzgy50hgb5zmdjiffaqp277a68564vflfpjvk1gv6079zahksc"; + url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/8b7dde4b54da821ca3dc2058178d6ffbd2e25bc5/nixos-mailserver-8b7dde4b54da821ca3dc2058178d6ffbd2e25bc5.tar.gz"; + sha256 = "0pf25ns3yq9vdbpb30cplx4zkj7srrklamd6kw7ifaf7gyc7fy65"; }) ]; From 34dd10327fbf4407028da13321d3d094b5ec244c Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Tue, 22 Jan 2019 11:02:32 +0100 Subject: [PATCH 7/7] maj NixOS --- systems/LoutreOS/configuration.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systems/LoutreOS/configuration.nix b/systems/LoutreOS/configuration.nix index b65f167..193a181 100644 --- a/systems/LoutreOS/configuration.nix +++ b/systems/LoutreOS/configuration.nix @@ -5,7 +5,7 @@ { config, pkgs, ... }: let - gitRev = "baee8283bb858602e6b8d9c4763f11f79d4ac813"; + gitRev = "0af0b7a9cf9dc426c3686fd8b9369251ef18805a"; nixpkgs = fetchTarball "https://github.com/nyanloutre/nixpkgs/archive/${gitRev}.tar.gz"; in {