summary refs log tree commit diff stats
path: root/system
diff options
context:
space:
mode:
authorAlan Pearce2020-11-25 17:40:19 +0100
committerAlan Pearce2020-11-25 17:40:19 +0100
commit78a0cc4278c5140f8852308d2590777a3ac433c5 (patch)
tree5142aa30b7195923627167eaa6cfdb12cd2696f0 /system
parentacef55c13e89220f6b23e67cc3251280b50a5978 (diff)
downloadnixfiles-78a0cc4278c5140f8852308d2590777a3ac433c5.tar.lz
nixfiles-78a0cc4278c5140f8852308d2590777a3ac433c5.tar.zst
nixfiles-78a0cc4278c5140f8852308d2590777a3ac433c5.zip
prefect: share Music and Videos folders via CIFS
Diffstat (limited to 'system')
-rw-r--r--system/prefect.nix26
1 files changed, 26 insertions, 0 deletions
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 = {