obsidian: fix nvidia-gpu causing issues

This commit is contained in:
Christoph Hollizeck 2024-10-12 00:31:33 +02:00
parent 8a1b154cfe
commit 89d89c583a
2 changed files with 18 additions and 2 deletions

View file

@ -15,11 +15,12 @@ in
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.nvidia-vaapi-driver ];
hardware.graphics = { hardware.graphics = {
enable = true; enable = true;
enable32Bit = true; enable32Bit = true;
extraPackages = [
pkgs.nvidia-vaapi-driver
];
}; };
hardware.nvidia = { hardware.nvidia = {

View file

@ -0,0 +1,15 @@
{ ... }:
final: prev: {
obsidian = prev.obsidian.overrideAttrs (oldAttrs: rec {
# Add arguments to the .desktop entry
desktopItem = oldAttrs.desktopItem.override (desktopitem: {
exec = "${desktopitem.exec} --disable-gpu ";
});
# Update the install script to use the new .desktop entry
installPhase = builtins.replaceStrings [ "${oldAttrs.desktopItem}" ] [
"${desktopItem}"
] oldAttrs.installPhase;
});
}