diff --git a/nix/steam_deck/configuration/home.nix b/nix/steam_deck/configuration/home.nix index 3b905dd..696a772 100644 --- a/nix/steam_deck/configuration/home.nix +++ b/nix/steam_deck/configuration/home.nix @@ -10,6 +10,7 @@ ./roles/2ship2harkinian ./roles/graphics ./roles/shipwright + ./roles/sm64ex ./roles/steam_rom_manager ./util/unfree_polyfill ]; diff --git a/nix/steam_deck/configuration/hosts/deck/default.nix b/nix/steam_deck/configuration/hosts/deck/default.nix index a9cf960..b21f52f 100644 --- a/nix/steam_deck/configuration/hosts/deck/default.nix +++ b/nix/steam_deck/configuration/hosts/deck/default.nix @@ -12,6 +12,7 @@ me.graphical = true; me.ship2harkinian.enable = true; me.shipwright.enable = true; + me.sm64ex.enable = true; me.steam_rom_manager.enable = false; # Steam rom manager UI does not render. I think it wants to be in an AppImage. }; } diff --git a/nix/steam_deck/configuration/roles/sm64ex/default.nix b/nix/steam_deck/configuration/roles/sm64ex/default.nix new file mode 100644 index 0000000..3efb338 --- /dev/null +++ b/nix/steam_deck/configuration/roles/sm64ex/default.nix @@ -0,0 +1,50 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + imports = [ ]; + + options.me = { + sm64ex.enable = lib.mkOption { + type = lib.types.bool; + default = false; + example = true; + description = "Whether we want to install sm64ex."; + }; + }; + + config = lib.mkIf config.me.sm64ex.enable ( + lib.mkMerge [ + (lib.mkIf config.me.graphical { + allowedUnfree = [ "sm64ex" ]; + + home.packages = with pkgs; [ + (config.lib.nixGL.wrap sm64ex) + ]; + + # nixpkgs.overlays = [ + # (final: prev: { + # sm4ex = prev.sm64ex.override { + # baseRom.name = "SuperMario64.z64"; + # }; + # }) + # ]; + + # TODO perhaps install ~/.local/share/sm64ex/sm64config.txt + + home.persistence."/home/deck/.persist" = { + directories = [ + { + directory = ".local/share/sm64ex"; + method = "symlink"; + } + ]; + }; + }) + ] + ); +}