anchor.diff:    };
   
     config = mkMerge [
  -    (mkIf cfg.enable {
  +    (mkIf (cfg.enable || flashbackEnabled) {
         services.gnome3.core-os-services.enable = true;
         services.gnome3.core-shell.enable = true;
         services.gnome3.core-utilities.enable = mkDefault true;
   
  -      services.xserver.displayManager.extraSessionFilePackages = [ pkgs.gnome3.gnome-session ]
  -      ++ map
  +      services.xserver.displayManager.extraSessionFilePackages = [ pkgs.gnome3.gnome-session ];
  +
  +      environment.extraInit = ''
  +        ${concatMapStrings (p: ''
  +          if [ -d "${p}/share/gsettings-schemas/${p.name}" ]; then
  +            export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${p}/share/gsettings-schemas/${p.name}
  +          fi
  +
  +          if [ -d "${p}/lib/girepository-1.0" ]; then
  +            export GI_TYPELIB_PATH=$GI_TYPELIB_PATH''${GI_TYPELIB_PATH:+:}${p}/lib/girepository-1.0
  +            export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${p}/lib
  +          fi
  +        '') cfg.sessionPath}
  +      '';
  +
  +      environment.systemPackages = cfg.sessionPath;
  +
  +      environment.variables.GNOME_SESSION_DEBUG = mkIf cfg.debug "1";
  +
  +      # Override GSettings schemas
  +      environment.variables.NIX_GSETTINGS_OVERRIDES_DIR = "${nixos-gsettings-desktop-schemas}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas";
  +
  +       # If gnome3 is installed, build vim for gtk3 too.
  +      nixpkgs.config.vim.gui = "gtk3";
  +    })
  +
  +    (mkIf flashbackEnabled {
  +      services.xserver.displayManager.extraSessionFilePackages =  map
           (wm: pkgs.gnome3.gnome-flashback.mkSessionForWm {
             inherit (wm) wmName wmLabel wmCommand;
           }) (optional cfg.flashback.enableMetacity {
  
positive.code:         pkgs.xdg-user-dirs # Update user dirs as described in http://freedesktop.org/wiki/Software/xdg-user-dirs/
          vino
        ];
  
        security.pam.services.gnome-screensaver = mkIf flashbackEnabled {
          enableGnomeKeyring = true;
        };
      })
  
      (mkIf serviceCfg.core-utilities.enable {
  
negative.code:       services.telepathy.enable = mkDefault true;
        systemd.packages = [ pkgs.gnome3.vino ];
        services.dbus.packages =
          optional config.services.printing.enable pkgs.system-config-printer;
  
        services.geoclue2.enable = mkDefault true;
        services.geoclue2.enableDemoAgent = false; # GNOME has its own geoclue agent
  