diff --git a/machines/hitagi/hardware-configuration.nix b/machines/hitagi/hardware-configuration.nix index 33ecf6b..43bd8b0 100644 --- a/machines/hitagi/hardware-configuration.nix +++ b/machines/hitagi/hardware-configuration.nix @@ -6,6 +6,23 @@ ]; boot = { + # Intel arc + #kernelPackages = pkgs.linuxPackages_latest; + kernelPackages = pkgs.unstable.recurseIntoAttrs (pkgs.unstable.linuxPackagesFor (pkgs.unstable.callPackage + ({ fetchurl, buildLinux, ... } @ args: buildLinux (args // rec { + version = "6.2.0-rc7"; + modDirVersion = version; + + src = fetchurl { + url = "https://git.kernel.org/torvalds/t/linux-6.2-rc7.tar.gz"; + sha256 = "sha256-6klAGw+J0usyY55dTMb/reUbAobJdheG/6YvNGz7SwM="; + }; + + kernelPatches = [ ]; + + extraMeta.branch = "6.2"; + } // (args.argsOverride or { }))) + { })); # fan control configuration from https://gist.github.com/bakman2/e801f342aaa7cade62d7bd54fd3eabd8 kernelModules = [ "kvm-amd" "it87" ]; kernelParams = [ "acpi_enforce_resources=lax" ]; # allow it87 to load @@ -75,16 +92,33 @@ ]; # GPU - hardware.opengl.extraPackages = with pkgs; [ - rocm-opencl-icd - ]; + hardware.opengl = { + package = pkgs.unstable.mesa.drivers; + package32 = pkgs.unstable.pkgsi686Linux.mesa.drivers; + extraPackages = with pkgs; [ + intel-media-driver + libvdpau-va-gl + vaapiIntel + vaapiVdpau + ] ++ (with pkgs.unstable; [ + intel-compute-runtime + intel-compute-runtime.drivers + level-zero + ]); + }; environment.systemPackages = with pkgs; [ clinfo - radeontop - rocm-smi + nvtop-amd # also returns basic stats for intel ]; + security.wrappers."intel_gpu_top" = { + owner = "root"; + group = "root"; + capabilities = "cap_perfmon+p"; + source = "${pkgs.unstable.intel-gpu-tools}/bin/intel_gpu_top"; + }; + # https://www.reddit.com/r/gigabyte/comments/p5ewjn/b550i_pro_ax_f13_bios_sleep_issue_on_linux/ systemd.services.suspend-fix = { wantedBy = [ "multi-user.target" ]; @@ -105,7 +139,7 @@ }; sbruder.fancontrol = { - enable = true; + enable = false; # no hwmon for intel arc (yet) enableDefaultMapping = true; fans = { front = { diff --git a/pkgs/default.nix b/pkgs/default.nix index 6d19a67..e4190bf 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -30,6 +30,24 @@ in ''; }); + # FIXME: remove once manghud > 0.6.8 is in nixpkgs/intel arc works + mangohud = prev.mangohud.overrideAttrs (o: { + version = "unstable-2023-02-05"; + + src = prev.fetchFromGitHub { + owner = "flightlessmango"; + repo = "MangoHud"; + rev = "319077808668c589523853313d028cf81837ce72"; + fetchSubmodules = true; + sha256 = "sha256-FHm5CcLKpD6R2XmGvlQrIU/OlkX1TGEN/ld3vrms2Lk="; + }; + + mesonFlags = o.mesonFlags ++ [ + "-Dappend_libdir_mangohud=false" # new default incompatible with current packaging + "-Dtests=disabled" # tests require new subproject + ]; + }); + vimPlugins = prev.vimPlugins // { # TODO: Remove once (if?) https://github.com/LnL7/vim-nix/pull/28 lands vim-nix = prev.vimPlugins.vim-nix.overrideAttrs (o: { diff --git a/users/simon/modules/games.nix b/users/simon/modules/games.nix index 6f81376..915afe0 100644 --- a/users/simon/modules/games.nix +++ b/users/simon/modules/games.nix @@ -91,8 +91,9 @@ let ''; in lib.mkIf cfg.enable { - home.packages = with pkgs; [ ] - ++ lib.optionals (cfg.performanceIndex >= 2) [ + home.packages = with pkgs; [ + unstable.mangohud + ] ++ lib.optionals (cfg.performanceIndex >= 2) [ mgba ] ++ lib.optionals (cfg.performanceIndex >= 4) [ desmume @@ -100,8 +101,7 @@ lib.mkIf cfg.enable { ] ++ lib.optionals (cfg.performanceIndex >= 8) [ unstable.ryujinx unstable.yuzu-mainline - ] - ++ lib.optionals unfree.allowSoftware [ + ] ++ lib.optionals unfree.allowSoftware [ unstable.osu-lazer-sandbox steam-sandbox-with-icons ];