diff options
Diffstat (limited to 'modules/gaming')
| -rw-r--r-- | modules/gaming/heroic/default.nix | 16 | ||||
| -rw-r--r-- | modules/gaming/steam/default.nix | 9 |
2 files changed, 17 insertions, 8 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" ]; diff --git a/modules/gaming/steam/default.nix b/modules/gaming/steam/default.nix index 5662656..a8f7fbc 100644 --- a/modules/gaming/steam/default.nix +++ b/modules/gaming/steam/default.nix @@ -1,10 +1,13 @@ # Game store { config, - pkgs, lib, + pkgs, ... }: +let + cfg = config.gaming.steam; +in { options.gaming.steam = { enable = lib.mkEnableOption "Enables steam."; @@ -15,7 +18,7 @@ }; }; - config = lib.mkIf config.gaming.steam.enable { - home.packages = [ config.gaming.steam.package ]; + config = lib.mkIf cfg.enable { + home.packages = [ cfg.package ]; }; } |
