diff --git a/hosts/desktop/default.nix b/hosts/desktop/default.nix index a6d5af7..b781d94 100644 --- a/hosts/desktop/default.nix +++ b/hosts/desktop/default.nix @@ -12,8 +12,9 @@ nixpkgs.lib.nixosSystem { gui.enable = true; gui.compositor.enable = true; nixpkgs.overlays = [ nur.overlay ]; - gaming.leagueoflegends = true; gaming.steam = true; + gaming.leagueoflegends = true; + gaming.legendary = true; } ./hardware-configuration.nix ../common.nix diff --git a/modules/gaming/default.nix b/modules/gaming/default.nix index 98b5aee..7b26dc6 100644 --- a/modules/gaming/default.nix +++ b/modules/gaming/default.nix @@ -1,6 +1,6 @@ { config, ... }: { - imports = [ ./leagueoflegends.nix ./lutris.nix ./steam.nix ]; + imports = [ ./leagueoflegends.nix ./lutris.nix ./steam.nix ./legendary.nix ]; config = { hardware.opengl = { diff --git a/modules/gaming/leagueoflegends.nix b/modules/gaming/leagueoflegends.nix index ff9decc..77e599f 100644 --- a/modules/gaming/leagueoflegends.nix +++ b/modules/gaming/leagueoflegends.nix @@ -14,7 +14,7 @@ # Lutris requirement to install the game lutris amdvlk - wine + wineWowPackages.stable # Required according to https://lutris.net/games/league-of-legends/ openssl diff --git a/modules/gaming/legendary.nix b/modules/gaming/legendary.nix new file mode 100644 index 0000000..0d49636 --- /dev/null +++ b/modules/gaming/legendary.nix @@ -0,0 +1,39 @@ +{ config, pkgs, lib, ... }: { + + options.gaming.legendary = + lib.mkEnableOption "Legendary - Epic Games Launcher"; + + config = lib.mkIf config.gaming.legendary { + environment.systemPackages = with pkgs; [ + legendary-gl + rare # GUI for Legendary (not working) + wineWowPackages.stable # 32-bit and 64-bit wineWowPackages + ]; + + home-manager.users.${config.user} = { + + xdg.configFile."legendary/config.ini".text = '' + [Legendary] + ; Disables the automatic update check + disable_update_check = false + ; Disables the notice about an available update on exit + disable_update_notice = true + ; Set install directory + install_dir = /home/${config.user}/media/games + ; Make output quiet + log_level = warning + ''; + + home.file = let + ignorePatterns = '' + .wine/ + drive_c/''; + in { + ".rgignore".text = ignorePatterns; + ".fdignore".text = ignorePatterns; + }; + + }; + }; + +} diff --git a/modules/gaming/lutris.nix b/modules/gaming/lutris.nix index 812cb91..a8cac00 100644 --- a/modules/gaming/lutris.nix +++ b/modules/gaming/lutris.nix @@ -3,7 +3,11 @@ options.gaming.lutris = lib.mkEnableOption "Lutris"; config = lib.mkIf config.gaming.lutris { - environment.systemPackages = with pkgs; [ lutris amdvlk wine ]; + environment.systemPackages = with pkgs; [ + lutris + amdvlk # Vulkan drivers (probably already installed) + wineWowPackages.stable # 32-bit and 64-bit wineWowPackages + ]; }; } diff --git a/modules/gaming/steam.nix b/modules/gaming/steam.nix index a52e611..f77d5ef 100644 --- a/modules/gaming/steam.nix +++ b/modules/gaming/steam.nix @@ -5,7 +5,15 @@ config = lib.mkIf config.gaming.steam { hardware.steam-hardware.enable = true; nixpkgs.config.allowUnfree = true; - environment.systemPackages = with pkgs; [ steam ]; + environment.systemPackages = with pkgs; [ + + steam + + # Enable terminal interaction + steamPackages.steamcmd + steam-tui + + ]; }; }