all repos — nixfiles @ 78a0cc4278c5140f8852308d2590777a3ac433c5

System and user configuration, managed by nix and home-manager

prefect: share Music and Videos folders via CIFS
Alan Pearce alan@alanpearce.eu
Wed, 25 Nov 2020 17:40:19 +0100
commit

78a0cc4278c5140f8852308d2590777a3ac433c5

parent

acef55c13e89220f6b23e67cc3251280b50a5978

1 files changed, 26 insertions(+), 0 deletions(-)

jump to
M system/prefect.nixsystem/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 = {