anchor.diff:              samba-smbd = daemonService "smbd" "";
               samba-nmbd = mkIf cfg.enableNmbd (daemonService "nmbd" "");
               samba-winbindd = mkIf cfg.enableWinbindd (daemonService "winbindd" "");
  -            samba-setup = {
  -              description = "Samba Setup Task";
  -              script = setupScript;
  -              unitConfig.RequiresMountsFor = "/var/lib/samba";
  -            };
             };
  +          tmpfiles.rules = [
  +            "d /var/lock/samba - - - - -"
  +            "d /var/log/samba - - - - -"
  +            "d /var/cache/samba - - - - -"
  +            "d /var/lib/samba/private - - - - -"
  +          ];
           };
   
           security.pam.services.samba = {};
  
positive.code:         systemd = {
            targets.samba = {
              description = "Samba Server";
              requires = [ "samba-setup.service" ];
              after = [ "samba-setup.service" "network.target" ];
              wantedBy = [ "multi-user.target" ];
            };
            # Refer to https://github.com/samba-team/samba/tree/master/packaging/systemd
  
negative.code:         Type = "notify";
          NotifyAccess = "all"; #may not do anything...
        };
        unitConfig.RequiresMountsFor = "/var/lib/samba";
  
        restartTriggers = [ configFile ];
      };
  