From 5b95e945da57ef4407cbde0ebf8506b18a6ffe93 Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Fri, 16 Feb 2024 00:58:18 +0800 Subject: [PATCH] blacksteel: add samba --- hosts/blacksteel/default.nix | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/hosts/blacksteel/default.nix b/hosts/blacksteel/default.nix index 58aa4e7..9bdcb05 100644 --- a/hosts/blacksteel/default.nix +++ b/hosts/blacksteel/default.nix @@ -22,6 +22,11 @@ # [ ] fan is *blasting* even after I installed mbpfans # [ ] audio quality isnt too great (compared to macOS, or i might have wooden ears) + + ######## Services + services.tailscale.enable = true; + + # Minecraft services.minecraft-server = { enable = true; eula = true; @@ -33,7 +38,7 @@ serverProperties = { motd = "NixOS Minecraft server!"; white-list = true; - + difficulty = 3; gamemode = 0; max-players = 5; @@ -44,5 +49,20 @@ }; }; - services.tailscale.enable = true; + # Samba + services.samba = { + enable = true; + openFirewall = true; + shares."share" = { + path = "/srv/samba/share"; + "read only" = "no"; + }; + }; + services.samba-wsdd = { + enable = true; + openFirewall = true; + }; + systemd.tmpfiles.rules = [ + "d /srv/samba/share 0700 guanranwang root" + ]; }