diff --git a/hosts/common/programs/assorted.nix b/hosts/common/programs/assorted.nix index 33ac4eaa5..acddcb45b 100644 --- a/hosts/common/programs/assorted.nix +++ b/hosts/common/programs/assorted.nix @@ -257,6 +257,7 @@ in # "powermanga" # STYLISH space invaders derivative (keyboard-only) "shattered-pixel-dungeon" # doesn't cross compile "sm64ex-coop" + "sm64ex-coop-deluxe" "space-cadet-pinball" # LMB/RMB controls (bindable though. volume buttons?) "steam" "superTux" # keyboard-only controls diff --git a/hosts/common/programs/default.nix b/hosts/common/programs/default.nix index 0ee1658ca..84577846c 100644 --- a/hosts/common/programs/default.nix +++ b/hosts/common/programs/default.nix @@ -157,6 +157,7 @@ ./shadow.nix ./signal-desktop.nix ./sm64ex-coop.nix + ./sm64ex-coop-deluxe.nix ./soundconverter.nix ./splatmoji.nix ./spot.nix diff --git a/hosts/common/programs/sm64ex-coop-deluxe.nix b/hosts/common/programs/sm64ex-coop-deluxe.nix new file mode 100644 index 000000000..6e572144e --- /dev/null +++ b/hosts/common/programs/sm64ex-coop-deluxe.nix @@ -0,0 +1,24 @@ +{ config, lib, ... }: +let + cfg = config.sane.programs.sm64ex-coop-deluxe; +in +{ + sane.programs.sm64ex-coop-deluxe = { + sandbox.method = "bunpen"; + sandbox.net = "all"; + sandbox.whitelistAudio = true; + sandbox.whitelistDri = true; + sandbox.whitelistWayland = true; + sandbox.whitelistX = true; + sandbox.extraPaths = [ + "/dev/input" #< for controllers + ]; + + persist.byStore.plaintext = [ + ".local/share/sm64ex-coop" + ]; + }; + + # LAN play + networking.firewall.allowedUDPPorts = lib.mkIf cfg.enabled [ 2345 ]; +} diff --git a/pkgs/additional/sm64ex-coop-deluxe/default.nix b/pkgs/additional/sm64ex-coop-deluxe/default.nix index 29c571d0d..b47fb6d87 100644 --- a/pkgs/additional/sm64ex-coop-deluxe/default.nix +++ b/pkgs/additional/sm64ex-coop-deluxe/default.nix @@ -86,11 +86,14 @@ in (callPackage "${nixpkgs}/pkgs/games/sm64ex/generic.nix" { mkdir -p $out/bin ( echo '#!${bash}/bin/bash' - echo "cd $out/share/${pname}" - echo 'exec ./${pname}-unwrapped "$@"' + echo "cd $out/share/${pname}" + echo 'exec ./${pname}-unwrapped "$@"' ) > $out/bin/${pname} chmod a+x $out/bin/${pname} + # you're supposed to manually drag and drop the baserom at start, or you can put it here and it discovers it :) + cp ./baserom.*.z64 $out/share/sm64coopdx + runHook postInstall ''; }