Skip to content

Commit

Permalink
nixos/sway: warn on too old Nvidia
Browse files Browse the repository at this point in the history
  • Loading branch information
FliegendeWurst committed Jan 9, 2025
1 parent 14a1e95 commit 8664aa5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions nixos/modules/programs/wayland/sway.nix
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,19 @@ in
}
];

warnings =
lib.mkIf
(
(lib.elem "nvidia" config.services.xserver.videoDrivers)
&& !config.hardware.nvidia.open
&& (lib.versionOlder "551" (
lib.versions.major (lib.getVersion hardware.nvidia.package)
))
)
[
"Using Sway with Nvidia driver version <= 550 may result in a broken system. Configure hardware.nvidia.package to use a newer version."
];

environment = {
systemPackages = lib.optional (cfg.package != null) cfg.package ++ cfg.extraPackages;

Expand Down

0 comments on commit 8664aa5

Please sign in to comment.