aboutsummaryrefslogtreecommitdiffstats
path: root/modules/gaming/heroic/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gaming/heroic/default.nix')
-rw-r--r--modules/gaming/heroic/default.nix16
1 files changed, 11 insertions, 5 deletions
diff --git a/modules/gaming/heroic/default.nix b/modules/gaming/heroic/default.nix
index ccdebed..61eceb5 100644
--- a/modules/gaming/heroic/default.nix
+++ b/modules/gaming/heroic/default.nix
@@ -1,10 +1,13 @@
# Epic, GOG and Amazon game launcher
{
config,
- pkgs,
lib,
+ pkgs,
...
}:
+let
+ cfg = config.gaming.heroic;
+in
{
options.gaming.heroic = {
enable = lib.mkEnableOption "Enables Heroic Games Launcher.";
@@ -28,13 +31,16 @@
};
};
- config = lib.mkIf config.gaming.heroic.enable {
- home.packages = [ config.gaming.heroic.package ];
+ config = lib.mkIf cfg.enable {
+ home.packages = [ cfg.package ];
+
+ home.file.".local/share/icons/hicolor/scalable/apps/com.heroicgameslauncher.hgl.svg".source =
+ config.lib.file.mkOutOfStoreSymlink "${pkgs.heroic}/share/icons/hicolor/scalable/apps/com.heroicgameslauncher.hgl.svg";
xdg.desktopEntries."heroic" = {
name = "Heroic Games Launcher";
- exec = "${lib.getExe' config.gaming.heroic.package "heroic"} %u";
- icon = "${pkgs.heroic}/share/icons/hicolor/scalable/apps/com.heroicgameslauncher.hgl.svg";
+ exec = "${lib.getExe' cfg.package "heroic"} %u";
+ icon = "com.heroicgameslauncher.hgl";
comment = "An Open Source Launcher for GOG, Epic Games and Amazon Games";
categories = [ "Game" ];
mimeType = [ "x-scheme-handler/heroic" ];