[nix] Messing around with how to override desktop files

This commit is contained in:
2025-04-17 20:03:18 -07:00
parent 828aaa5d40
commit c2a5e0a709
6 changed files with 138 additions and 84 deletions

View File

@@ -1,4 +1,16 @@
{ pkgs, ... }:
{ pkgs, local, ... }:
# let
# patched-desktop =
# pkgs.runCommand "patched-wowup-cf-desktop"
# {
# desktop = "${pkgs.wowup-cf}/share/applications/wowup-cf.desktop";
# }
# ''
# mkdir -p $out
# substitute "$desktop" "$out/wowup-cf.desktop" \
# --replace-fail 'Exec=wowup-cf' 'Exec=wowup-cf --enable-features=UseOzonePlatform --ozone-platform=wayland --disable-gpu'
# '';
# in
{
home.packages = with pkgs; [
# Gaming
@@ -16,19 +28,21 @@
wowup-cf
];
xdg.desktopEntries = {
# wowup needs options to work under wayland.
wowup-cf = {
name = "WowUp";
# Custom options to reduce flickering under wayland.
exec = "wowup-cf --no-sandbox --enable-features=UseOzonePlatform --ozone-platform=wayland --disable-gpu %U";
terminal = false;
type = "Application";
icon = "wowup-cf";
comment = "World of Warcraft addon updater";
categories = [
"Game"
];
};
# xdg.dataFile."applications/wowup-cf.desktop" = {
# force = true;
# source = "${patched-desktop}/wowup-cf.desktop";
# };
# wowup needs options to work under wayland.
xdg.desktopEntries.wowup-cf = local.electronDesktopEntry {
name = "WowUp";
exec = "wowup-cf --no-sandbox";
terminal = false;
type = "Application";
icon = "wowup-cf";
comment = "World of Warcraft addon updater";
categories = [
"Game"
];
};
}