diff --git a/test-server/flake.nix b/test-server/flake.nix index b9fa045..2b631a1 100644 --- a/test-server/flake.nix +++ b/test-server/flake.nix @@ -17,6 +17,7 @@ ./modules/github-runner.nix ./modules/nextcloud.nix ./modules/acme.nix + ./modules/samba.nix #./modules/dyndns.nix i think ddclient is deprecated #./modules/home-assistant.nix idk dont like this agenix.nixosModules.default diff --git a/test-server/modules/acme.nix b/test-server/modules/acme.nix index e0d805e..77bd1ce 100644 --- a/test-server/modules/acme.nix +++ b/test-server/modules/acme.nix @@ -2,6 +2,6 @@ security.acme = { acceptTerms = true; # Replace the email here! - email = "7265381+Kropatz@users.noreply.github.com"; + defaults.email = "7265381+Kropatz@users.noreply.github.com"; }; } \ No newline at end of file diff --git a/test-server/modules/samba.nix b/test-server/modules/samba.nix new file mode 100644 index 0000000..6f8d442 --- /dev/null +++ b/test-server/modules/samba.nix @@ -0,0 +1,46 @@ +{ + services.samba-wsdd.enable = true; # make shares visible for windows 10 clients + networking.firewall.allowedTCPPorts = [ + 5357 # wsdd + ]; + networking.firewall.allowedUDPPorts = [ + 3702 # wsdd + ]; + services.samba.openFirewall = true; + services.samba = { + enable = true; + securityType = "user"; + invalidUsers = [ + "root" + ]; + extraConfig = '' + workgroup = WORKGROUP + server string = smbnix + netbios name = smbnix + security = user + #use sendfile = yes + #max protocol = smb2 + # note: localhost is the ipv6 localhost ::1 + hosts allow = 192.168.0. 192.168.174.1 127.0.0.1 localhost + hosts deny = 0.0.0.0/0 + guest account = nobody + map to guest = bad user + ''; + shares = { + homes = { + browseable = "no"; + writable = "yes"; + }; + private = { + path = "/mnt/Shares/Private"; + browseable = "yes"; + "read only" = "no"; + "guest ok" = "no"; + "create mask" = "0644"; + "directory mask" = "0755"; + "force user" = "username"; + "force group" = "groupname"; + }; + }; + }; +} \ No newline at end of file