From a21d65df116e8d0abff74591cefe061cdb0dd459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kha=C3=AFs=20COLIN?= Date: Mon, 26 Aug 2024 14:23:58 +0200 Subject: [PATCH] feat(Music): create samba share for music --- common.nix | 4 +++- void.nix | 29 +++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/common.nix b/common.nix index 5ca4d6b..157a655 100644 --- a/common.nix +++ b/common.nix @@ -80,9 +80,11 @@ initialPassword = "asunarovow"; isNormalUser = true; description = "Khaïs COLIN"; - extraGroups = [ "networkmanager" "wheel" "podman" "libvirtd" ]; + extraGroups = [ "networkmanager" "wheel" "podman" "libvirtd" "music" ]; shell = pkgs.zsh; }; + # access to /pile/Music + users.groups.music = {}; users.users.guest = { createHome = true; diff --git a/void.nix b/void.nix index 92fb661..fddeffd 100644 --- a/void.nix +++ b/void.nix @@ -9,4 +9,33 @@ ]; networking.hostName = "void"; # Define your hostname. + + services.samba = { + enable = true; + openFirewall = true; + securityType = "user"; + extraConfig = '' + workgroup = WORKGROUP + server string = void + netbios name = void + security = user + hosts allow = 0.0.0.0/0 + guest account = nobody + map to guest = bad user + log level = 4 + #smb encrypt = mandatory + ''; + shares."Music" = { + path = "/pile/Music"; + browsable = "yes"; + "read only" = "yes"; + "guest ok" = "no"; + "read list" = "@music"; + }; + }; + + users.users.music = { + group = "music"; + isNormalUser = true; + }; }