diff options
| author | Arpit Chakladar <arpitchakladar@gmail.com> | 2026-09-24 04:02:19 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar@gmail.com> | 2026-09-24 04:02:19 +0530 |
| commit | 5ea8c30b7b82d4c1e7164541892066b1f24f7d22 (patch) | |
| tree | ad9b994cc5415f63bae1f2342f520756d43c67ce /modules/gaming | |
| parent | ad96214c9ab94bce925000a6059e3c68e2ff6a22 (diff) | |
| parent | 748669e19daa3afc8f0cfe10eedc19ae9766ed2c (diff) | |
| download | home-manager-config-5ea8c30b7b82d4c1e7164541892066b1f24f7d22.tar.gz home-manager-config-5ea8c30b7b82d4c1e7164541892066b1f24f7d22.zip | |
Merge branch 'massive-refactoring'
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 ]; }; } |
