Super Smash Bros. Melee: Difference between revisions

Smudgebun (talk | contribs)
Added information about running the AppImage on NixOS
Smudgebun (talk | contribs)
Slippi: Add example of enabling slippi-nix default nixosModule
 
(One intermediate revision by the same user not shown)
Line 4: Line 4:
You can use the [https://github.com/lytedev/slippi-nix slippi-nix] flake to declaratively install and configure Slippi with Nix, or get the AppImage directly from [https://slippi.gg/ Slippi's website].
You can use the [https://github.com/lytedev/slippi-nix slippi-nix] flake to declaratively install and configure Slippi with Nix, or get the AppImage directly from [https://slippi.gg/ Slippi's website].


If you are using the AppImage, to run Slippi Online or Slippi Playback you will need <code>libcurl.so.4</code> to be in your [[Appimage#Run|appimage-run]] packages. This can be easily added through a package like <code>curlMinimal</code>.
If you are using the [[Appimage]], to run Slippi Online or Slippi Playback you will need <code>libcurl.so.4</code> to be in your [[Appimage#Run|appimage-run]] packages. This can be easily added through a package like <code>curlMinimal</code>.


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
Line 10: Line 10:
   pkgs.curlMinimal.out
   pkgs.curlMinimal.out
   ];};
   ];};
</syntaxhighlight>
The configuration to setup Appimage support and specifically the Slippi Appimage would look like the following
<syntaxhighlight lang="nix">
{
  programs.appimage = {
    enable = true;
    binfmt = true;
  };
  programs.appimage.package = pkgs.appimage-run.override {
    extraPkgs = pkgs: [
      pkgs.curlMinimal.out
    ];
  };
}
</syntaxhighlight>
Which is just the snippet from [[Appimage#Configuration]] with the needed library added to the <code>appimage-run</code> package.
Even when using the Appimage, you can still use [https://github.com/lytedev/slippi-nix slippi-nix]'s optional <code>default</code> nixosModule to automatically setup the udev rules needed to optimize GameCube adapters, assuming you have a [[NixOS_system_configuration#Defining_NixOS_as_a_flake|flake-based configuration]].
<syntaxhighlight lang="nix">
{
  inputs.slippi= {
    url = "github:lytedev/slippi-nix";
    inputs.nixpkgs.follows = "nixpkgs";
  };
  outputs = {slippi, nixpkgs, ...}: {
    nixosConfigurations.alice = nixpkgs.lib.nixosSystem {
      modules = [
        slippi.nixosModules.default
      ];
    };
  };
}
</syntaxhighlight>
</syntaxhighlight>