From 8d54a2a331132efb7410b39a65d2de28972434ee Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 28 Dec 2021 22:16:41 +0100 Subject: vidhar: samba: ... --- hosts/vidhar/default.nix | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) (limited to 'hosts/vidhar') diff --git a/hosts/vidhar/default.nix b/hosts/vidhar/default.nix index 6913b9da..d97de10b 100644 --- a/hosts/vidhar/default.nix +++ b/hosts/vidhar/default.nix @@ -341,10 +341,17 @@ enable = true; securityType = "user"; extraConfig = '' + domain master = yes workgroup = WORKGROUP + load printers = no + printing = bsd + printcap name = /dev/null + disable spoolss = yes + guest account = nobody ''; shares = { homes = { + comment = "Home Directories"; path = "/home/%S"; browseable = "no"; "valid users" = "%S"; @@ -356,7 +363,14 @@ "shadow:sort" = "desc"; "shadow: format" = "-%Y-%m-%d-%Hh%MU"; "shadow: snapprefix" = "^zfs-auto-snap_\(frequent\)\{0,1\}\(hourly\)\{0,1\}\(daily\)\{0,1\}\(monthly\)\{0,1\}"; - "shadow: delimiter" = "-20"; + "shadow: delimiter" = ""; + }; + eos = { + comment = "Disk image of eos"; + browseable = true; + "valid users" = "mherold"; + writeable = "true"; + path = "/srv/eos"; }; }; }; @@ -365,4 +379,30 @@ workgroup = "WORKGROUP"; }; }; + + fileSystems."/srv/eos.lower" = { + device = "UUID=2A3052E73052BA11"; + fsType = "ntfs3"; + options = [ "ro" "uid=mherold" "gid=users" "fmask=0177" "dmask=0077" ]; + }; + + systemd.mounts = [ + { + wantedBy = [ "samba-smbd.service" ]; + before = [ "samba-smbd.service" ]; + + where = "/srv/eos"; + what = "overlay"; + type = "overlay"; + options = lib.concatStringsSep "," + [ "lowerdir=/srv/eos.lower" + "upperdir=/home/mherold/.eos.upper" + "workdir=/home/mherold/.eos.work" + ]; + + unitConfig = { + RequiresMountsFor = [ "/srv/eos.lower" "/home/mherold/.eos.upper" "/home/mherold/.eos.work" ]; + }; + } + ]; } -- cgit v1.2.3