anchor.diff:    cfg = config.services.samba;
   
     samba = cfg.package;
  -
  -  setupScript =
  -    ''
  -      mkdir -p /var/lock/samba /var/log/samba /var/cache/samba /var/lib/samba/private
  -    '';
   
     shareConfig = name:
       let share = getAttr name cfg.shares; in
  
positive.code:             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";
              };
            };
          };
  
          security.pam.services.samba = {};
  
negative.code:         Type = "notify";
          NotifyAccess = "all"; #may not do anything...
        };
        unitConfig.RequiresMountsFor = "/var/lib/samba";
  
        restartTriggers = [ configFile ];
      };
  