From bfb9206e745c37f0ed5391b05211aec89fb512d4 Mon Sep 17 00:00:00 2001 From: kalipso Date: Wed, 12 Jun 2024 10:51:23 +0200 Subject: [PATCH] [lucia] add samba --- machines/lucia/configuration.nix | 80 +++++++++++++++++++------------- 1 file changed, 49 insertions(+), 31 deletions(-) diff --git a/machines/lucia/configuration.nix b/machines/lucia/configuration.nix index 33d1f8e9..3791c39c 100644 --- a/machines/lucia/configuration.nix +++ b/machines/lucia/configuration.nix @@ -44,37 +44,6 @@ in services = { - #mopidy = { - # enable = true; - # configuration = '' - # [audio] - # output = alsasink - - # [mpd] - # enabled = true - # hostname = :: - # - # [core] - # restore_state = true - - # - # [http] - # allowed_origins = - # music.malobeo.org - # https://music.malobeo.org - - # - # [youtube] - # allow_cache = true - # youtube_dl_package = yt_dlp - # - # [file] - # enabled = true - # media_dirs = /var/lib/mpd/music/ - # ''; - # extensionPackages = with pkgs; [ mopidy-iris mopidy-mpd mopidy-youtube python3Packages.yt-dlp ]; - #}; - dokuwiki.sites."wiki.malobeo.org" = { enable = true; @@ -131,6 +100,55 @@ in enable = true; }; + samba = { + enable = true; + securityType = "user"; + openFirewall = true; + extraConfig = '' + workgroup = WORKGROUP + server string = smbmalo + netbios name = smbmalo + security = user + #use sendfile = yes + #max protocol = smb2 + # note: localhost is the ipv6 localhost ::1 + hosts allow = 192.168.0. 127.0.0.1 localhost + hosts deny = 0.0.0.0/0 + guest account = nobody + map to guest = bad user + ''; + shares = { + zines = { + comment = "malobeo Zines"; + path = "/var/sambaShares/zines"; + browseable = "yes"; + "read only" = "no"; + "guest ok" = "yes"; + "create mask" = "0644"; + "directory mask" = "0755"; + #"force user" = "username"; + #"force group" = "groupname"; + "write list" = "malobeo"; + "read list" = "guest nobody"; + }; + #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"; + #}; + }; + }; + + samba-wsdd = { + enable = true; + openFirewall = true; + }; + hedgedoc = { enable = true; settings = {