nixos/xserver: Remove with statements

They masked the evaluation error caused by removal of
`defaultSessionFromLegacyOptions` variable
in 6be2bfcc32d5ee203acf3b85354f5028c8bb50eb

+16 -19
+4 -5
nixos/modules/services/x11/desktop-managers/default.nix
··· 1 1 { config, lib, pkgs, ... }: 2 2 3 - with lib; 4 - 5 3 let 4 + inherit (lib) mkOption types; 6 5 7 6 xcfg = config.services.xserver; 8 7 cfg = xcfg.desktopManager; ··· 59 58 session = mkOption { 60 59 internal = true; 61 60 default = []; 62 - example = singleton 61 + example = lib.singleton 63 62 { name = "kde"; 64 63 bgSupport = true; 65 64 start = "..."; ··· 73 72 manage = "desktop"; 74 73 start = d.start 75 74 # literal newline to ensure d.start's last line is not appended to 76 - + optionalString (needBGCond d) '' 75 + + lib.optionalString (needBGCond d) '' 77 76 78 77 if [ -e $HOME/.background-image ]; then 79 - ${pkgs.feh}/bin/feh --bg-${cfg.wallpaper.mode} ${optionalString cfg.wallpaper.combineScreens "--no-xinerama"} $HOME/.background-image 78 + ${pkgs.feh}/bin/feh --bg-${cfg.wallpaper.mode} ${lib.optionalString cfg.wallpaper.combineScreens "--no-xinerama"} $HOME/.background-image 80 79 fi 81 80 ''; 82 81 });
+11 -12
nixos/modules/services/x11/display-managers/default.nix
··· 9 9 10 10 { config, lib, options, pkgs, ... }: 11 11 12 - with lib; 13 - 14 12 let 13 + inherit (lib) mkOption types literalExpression optionalString; 15 14 16 15 cfg = config.services.xserver; 17 16 xorg = pkgs.xorg; ··· 91 90 # Import environment variables into the systemd user environment. 92 91 ${optionalString (cfg.displayManager.importedVariables != []) ( 93 92 "/run/current-system/systemd/bin/systemctl --user import-environment " 94 - + toString (unique cfg.displayManager.importedVariables) 93 + + toString (lib.unique cfg.displayManager.importedVariables) 95 94 )} 96 95 97 96 # Speed up application start by 50-150ms according to ··· 247 246 # that do not have upstream session files (those defined using services.{display,desktop,window}Manager.session options). 248 247 services.displayManager.sessionPackages = 249 248 let 250 - dms = filter (s: s.manage == "desktop") cfg.displayManager.session; 251 - wms = filter (s: s.manage == "window") cfg.displayManager.session; 249 + dms = lib.filter (s: s.manage == "desktop") cfg.displayManager.session; 250 + wms = lib.filter (s: s.manage == "window") cfg.displayManager.session; 252 251 253 252 # Script responsible for starting the window manager and the desktop manager. 254 253 xsession = dm: wm: pkgs.writeScript "xsession" '' ··· 276 275 ''; 277 276 in 278 277 # We will generate every possible pair of WM and DM. 279 - concatLists ( 278 + lib.concatLists ( 280 279 lib.mapCartesianProduct 281 280 ({dm, wm}: let 282 281 sessionName = "${dm.name}${optionalString (wm.name != "none") ("+" + wm.name)}"; 283 282 script = xsession dm wm; 284 283 desktopNames = if dm ? desktopNames 285 - then concatStringsSep ";" dm.desktopNames 284 + then lib.concatStringsSep ";" dm.desktopNames 286 285 else sessionName; 287 286 in 288 - optional (dm.name != "none" || wm.name != "none") 287 + lib.optional (dm.name != "none" || wm.name != "none") 289 288 (pkgs.writeTextFile { 290 289 name = "${sessionName}-xsession"; 291 290 destination = "/share/xsessions/${sessionName}.desktop"; ··· 310 309 }; 311 310 312 311 imports = [ 313 - (mkRemovedOptionModule [ "services" "xserver" "displayManager" "desktopManagerHandlesLidAndPower" ] 312 + (lib.mkRemovedOptionModule [ "services" "xserver" "displayManager" "desktopManagerHandlesLidAndPower" ] 314 313 "The option is no longer necessary because all display managers have already delegated lid management to systemd.") 315 - (mkRenamedOptionModule [ "services" "xserver" "displayManager" "job" "logsXsession" ] [ "services" "displayManager" "logToFile" ]) 316 - (mkRenamedOptionModule [ "services" "xserver" "displayManager" "logToJournal" ] [ "services" "displayManager" "logToJournal" ]) 317 - (mkRenamedOptionModule [ "services" "xserver" "displayManager" "extraSessionFilesPackages" ] [ "services" "displayManager" "sessionPackages" ]) 314 + (lib.mkRenamedOptionModule [ "services" "xserver" "displayManager" "job" "logsXsession" ] [ "services" "displayManager" "logToFile" ]) 315 + (lib.mkRenamedOptionModule [ "services" "xserver" "displayManager" "logToJournal" ] [ "services" "displayManager" "logToJournal" ]) 316 + (lib.mkRenamedOptionModule [ "services" "xserver" "displayManager" "extraSessionFilesPackages" ] [ "services" "displayManager" "sessionPackages" ]) 318 317 ]; 319 318 320 319 }
+1 -2
nixos/modules/services/x11/window-managers/default.nix
··· 1 1 { config, lib, ... }: 2 2 3 - with lib; 4 - 5 3 let 4 + inherit (lib) mkOption types; 6 5 cfg = config.services.xserver.windowManager; 7 6 in 8 7