From 42dd305fdb5cad15864bb311c8af1e3f0e4f2b18 Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Thu, 21 Nov 2019 02:11:59 +0100 Subject: [PATCH] LoutreOS: LUN Steam --- systems/LoutreOS/hardware-configuration.nix | 5 ----- systems/LoutreOS/services.nix | 16 +++++++++++++++- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/systems/LoutreOS/hardware-configuration.nix b/systems/LoutreOS/hardware-configuration.nix index 418346f6d..72279d0fc 100644 --- a/systems/LoutreOS/hardware-configuration.nix +++ b/systems/LoutreOS/hardware-configuration.nix @@ -67,11 +67,6 @@ fsType = "zfs"; }; - fileSystems."/exports/steam" = - { device = "loutrepool/steam"; - fsType = "zfs"; - }; - fileSystems."/var/lib/syncthing" = { device = "loutrepool/var/syncthing"; fsType = "zfs"; diff --git a/systems/LoutreOS/services.nix b/systems/LoutreOS/services.nix index 44cd7bb62..ebbfc84af 100644 --- a/systems/LoutreOS/services.nix +++ b/systems/LoutreOS/services.nix @@ -62,7 +62,6 @@ in enable = true; exports = '' /mnt/medias 10.30.0.0/16(ro,no_root_squash) - /exports/steam 10.30.0.0/16(rw,async,no_root_squash) /var/lib/minecraft 10.30.0.0/16(rw,no_root_squash) ''; statdPort = 4000; @@ -294,6 +293,17 @@ in }; }; + systemd.packages = with pkgs; [ + tgt + ]; + + environment.etc."tgt/targets.conf".text = '' + + backing-store /dev/zvol/loutrepool/steam-lun + initiator-address 10.30.50.3 + + ''; + users.groups.acme.members = [ "matrix-synapse" ]; security.pam.services.sshd.text = pkgs.lib.mkDefault( pkgs.lib.mkAfter "session optional ${pkgs.pam}/lib/security/pam_exec.so seteuid ${login_mail_alert}/bin/mail_alert.sh" ); @@ -317,6 +327,10 @@ in nat.internalInterfaces = [ "wg0" ]; nat.internalIPs = [ "192.168.20.0/24" ]; + firewall.interfaces.eno2.allowedTCPPorts = [ + 3260 + ]; + firewall.allowedTCPPorts = [ 8448 # Matrix federation 20 21 # FTP