From b1e0a67ef30d0e6e957045bf254aa8f397d467d1 Mon Sep 17 00:00:00 2001 From: adikro Date: Wed, 1 Apr 2026 21:38:49 +0200 Subject: thinkpad sync --- os/core/drivers.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'os/core/drivers.nix') diff --git a/os/core/drivers.nix b/os/core/drivers.nix index 4198bf5..9b373db 100644 --- a/os/core/drivers.nix +++ b/os/core/drivers.nix @@ -2,12 +2,14 @@ config, lib, pkgs, + inputs, ... }: let cfg = config.os.core.drivers; in { + imports = [ inputs.nix-gaming-edge.nixosModules.default ]; options.os.core.drivers = { enable = lib.mkEnableOption "enables hardware drivers"; @@ -23,6 +25,14 @@ in graphics = { enable = lib.mkEnableOption "graphics support"; + version = lib.mkOption { + type = lib.types.enum [ + "stable" + "git" + ]; + default = "stable"; + description = "Which Mesa version to use. 'git' uses the mesa-git overlay."; + }; amdgpu.enable = lib.mkEnableOption "amd specific gpu features"; }; @@ -76,6 +86,14 @@ in rocmPackages.clr.icd ]; }) + (lib.mkIf (cfg.graphics.enable && cfg.graphics.version == "git") { + nixpkgs.overlays = [ inputs.nix-gaming-edge.overlays.mesa-git ]; + drivers.mesa-git = { + enable = true; + # cacheCleanup.enable = true; + # steamOrphanCleanup.enable = true; + }; + }) { boot.kernelPackages = let -- cgit v1.3