From 2ab0b3babfabac31c15dc754c366bd679d03e55e Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 5 Feb 2019 09:30:51 -0800 Subject: [PATCH] [NixOS] Add samba service to imalison-home --- nixos/machines/imalison-home.nix | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/nixos/machines/imalison-home.nix b/nixos/machines/imalison-home.nix index 7fb10313..7c1b2fae 100644 --- a/nixos/machines/imalison-home.nix +++ b/nixos/machines/imalison-home.nix @@ -61,6 +61,32 @@ networking.hostName = "imalison-home"; boot.loader.efi.canTouchEfiVariables = true; + services.samba = { + enable = true; + syncPasswordsByPam = true; + extraConfig = '' + workgroup = WORKGROUP + server string = smbnix + netbios name = smbnix + #use sendfile = yes + #max protocol = smb2 + hosts allow = 192.168.0 localhost + hosts deny = 0.0.0.0/0 + ''; + shares = { + private = { + path = "/backups"; + browseable = "yes"; + "read only" = "no"; + "guest ok" = "no"; + "create mask" = "0644"; + "directory mask" = "0755"; + "force user" = "username"; + "force group" = "groupname"; + }; + }; + }; + services.xserver = { screenSection = '' DefaultDepth 24