Unverified Commit f1cb6ce4 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

nixos/xserver: abort when encountering unknown xorg drivers (#486149)

parents b1c5f463 34057110
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -126,6 +126,8 @@

- `pocket-id` has been updated to version 2 that contains [breaking changes](https://pocket-id.org/docs/setup/major-releases/migrate-v2).

- `services.xserver` will now throw an error if an X11 driver specified in  `videoDriver(s)` cannot be found. Previously, unknown drivers would be silently ignored.

- `asio` (standalone version of `boost::asio`) has been updated from 1.24.0 to 1.36.0. Some breaking changes were introduced between these
  two versions, and the one affected most was the removal of `asio::io_service` in favor of `asio::io_context` in 1.33.0. `asio_1_32_0` is
  retained for packages that have not completed migration. `asio_1_10` has been removed as no packages depend on it anymore.
+7 −2
Original line number Diff line number Diff line
@@ -830,7 +830,8 @@ in

    services.xserver.videoDrivers = mkIf (cfg.videoDriver != null) [ cfg.videoDriver ];

    # FIXME: somehow check for unknown driver names.
    # We ignore unknown drivers here because they may be resolved by other modules (e.g., the Nvidia
    # module). We assert that all specified drivers were eventually found in the assertions below.
    services.xserver.drivers = flip concatMap cfg.videoDrivers (
      name:
      lib.optional (videoDrivers ? ${name}) (
@@ -862,7 +863,11 @@ in
        assertion = cfg.upscaleDefaultCursor -> cfg.dpi != null;
        message = "Specify `config.services.xserver.dpi` to upscale the default cursor.";
      }
    ];
    ]
    ++ map (driver: {
      assertion = builtins.elem driver (builtins.catAttrs "name" cfg.drivers);
      message = "Unknown X11 driver ‘${driver}’ specified in `services.xserver.videoDrivers`.";
    }) cfg.videoDrivers;

    environment.etc =
      (optionalAttrs cfg.exportConfiguration {