From f0b721c12dfa7f76d858f773a11921cd8479fd0e Mon Sep 17 00:00:00 2001 From: matt1432 Date: Wed, 31 Jul 2024 23:47:15 -0400 Subject: [PATCH] fix(bbsteamie): put symlink of gaming mode switch on desktop --- .../modules/desktop/session-switching.nix | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/devices/bbsteamie/modules/desktop/session-switching.nix b/devices/bbsteamie/modules/desktop/session-switching.nix index 4db20091..ca3e4d17 100644 --- a/devices/bbsteamie/modules/desktop/session-switching.nix +++ b/devices/bbsteamie/modules/desktop/session-switching.nix @@ -4,7 +4,7 @@ defaultSession: { pkgs, ... }: let - inherit (lib) getExe mkForce; + inherit (lib) findFirst getExe mkForce; inherit (config.vars) mainUser; @@ -83,12 +83,22 @@ in { } ]; - # Add desktop entry to make it GUI friendly - home-manager.users.${mainUser}.xdg.desktopEntries."Gaming Mode" = { - name = "Gaming Mode"; - exec = getExe gaming-mode; - icon = "steam"; - terminal = false; - type = "Application"; + home-manager.users.${mainUser} = { + # Add desktop entry to make it GUI friendly + xdg.desktopEntries."Gaming Mode" = { + name = "Gaming Mode"; + exec = getExe gaming-mode; + icon = "steam"; + terminal = false; + type = "Application"; + }; + + home.file."Desktop/Gaming Mode.desktop".source = + ( + findFirst + (x: x.meta.name == "Gaming Mode.desktop") {} + config.home-manager.users.mariah.home.packages + ) + + "/share/applications/Gaming Mode.desktop"; }; }