From 78a0cc4278c5140f8852308d2590777a3ac433c5 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 25 Nov 2020 17:40:19 +0100 Subject: prefect: share Music and Videos folders via CIFS --- system/prefect.nix | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'system') diff --git a/system/prefect.nix b/system/prefect.nix index 77b1f185..f3696efe 100644 --- a/system/prefect.nix +++ b/system/prefect.nix @@ -60,6 +60,32 @@ }; networking.firewall.allowedTCPPorts = [ config.services.postgresql.port ]; + networking.firewall.extraCommands = '' + iptables -A nixos-fw -p udp --source 172.30.44.0/24 -j nixos-fw-accept + iptables -A nixos-fw -p tcp --source 172.30.44.0/24 -j nixos-fw-accept + ip6tables -A nixos-fw -p tcp --source fdbf:4d14:b5de:0::/64 -j nixos-fw-accept + ip6tables -A nixos-fw -p udp --source fdbf:4d14:b5de:0::/64 -j nixos-fw-accept + ''; + + services.samba = { + enable = true; + shares = { + Music = { + path = "/data/Home/Music/"; + browseable = true; + "guest ok" = true; + }; + Videos = { + path = "/data/Home/Videos/"; + browseable = true; + "guest ok" = true; + }; + }; + extraConfig = '' + hide files = desktop.ini + ''; + }; + powerManagement.enable = false; powerManagement.cpuFreqGovernor = "performance"; networking = { -- cgit 1.4.1