anchor.diff:      #!/bin/sh
       ${concatMapStrings (n: "export ${n}=\"${getAttr n xEnv}\"\n") (attrNames xEnv)}
       exec ${dmcfg.xserverBin} ${dmcfg.xserverArgs} "$@"
  +  '';
  +
  +  Xsetup = pkgs.writeScript "Xsetup" ''
  +    #!/bin/sh
  +    ${cfg.setupScript}
  +  '';
  +
  +  Xstop = pkgs.writeScript "Xstop" ''
  +    #!/bin/sh
  +    ${cfg.stopScript}
     '';
   
     cfgFile = pkgs.writeText "sddm.conf" ''
  
positive.code:     SessionCommand=${dmcfg.session.script}
      SessionDir=${dmcfg.session.desktops}
      XauthPath=${pkgs.xorg.xauth}/bin/xauth
  
      ${optionalString cfg.autoLogin.enable ''
      [Autologin]
  
negative.code:         default = [];
          description = ''
            Extra packages providing themes.
          '';
        };
  
        setupScript = mkOption {
          type = types.str;
          default = "";
          example = ''
            # workaround for using NVIDIA Optimus without Bumblebee
            xrandr --setprovideroutputsource modesetting NVIDIA-0
            xrandr --auto
          '';
          description = ''
            A script to execute when starting the display server.
          '';
        };
  
        stopScript = mkOption {
          type = types.str;
          default = "";
          description = ''
            A script to execute when stopping the display server.
          '';
        };
  
  