diff --git a/nix/steam_deck/configuration/roles/2ship2harkinian/default.nix b/nix/steam_deck/configuration/roles/2ship2harkinian/default.nix index e26541d..2c6b2e5 100644 --- a/nix/steam_deck/configuration/roles/2ship2harkinian/default.nix +++ b/nix/steam_deck/configuration/roles/2ship2harkinian/default.nix @@ -1,3 +1,4 @@ +# MANUAL: mkdir -p ~/.persist/.local/share/2ship/saves { config, lib, @@ -24,19 +25,46 @@ } (lib.mkIf config.me.graphical { home.packages = with pkgs; [ - (config.lib.nixGL.wrap _2ship2harkinian) + _2ship2harkinian ]; - # TODO perhaps install ~/.local/share/2ship/2ship2harkinian.json + home.file.".local/share/2ship/2ship2harkinian.json" = { + source = ./files/2ship2harkinian.json; + }; home.persistence."/home/deck/.persist" = { directories = [ { - directory = ".local/share/2ship"; + directory = ".local/share/2ship/saves"; method = "symlink"; } ]; }; + home.persistence."/home/deck/.state" = { + files = [ + ".local/share/2ship/mm.o2r" + ]; + }; + + nixpkgs.overlays = [ + (final: prev: { + _2ship2harkinian = pkgs.buildEnv { + name = prev._2ship2harkinian.name; + paths = [ + (config.lib.nixGL.wrap prev._2ship2harkinian) + ]; + extraOutputsToInstall = [ + "man" + "doc" + "info" + ]; + # We have to use 555 instead of the normal 444 here because the .desktop file ends up inside $HOME on steam deck and desktop files must be either not in $HOME or must be executable, otherwise KDE Plasma refuses to execute them. + postBuild = '' + chmod 0555 $out/share/applications/2s2h.desktop + ''; + }; + }) + ]; }) ] ); diff --git a/nix/steam_deck/configuration/roles/2ship2harkinian/files/2ship2harkinian.json b/nix/steam_deck/configuration/roles/2ship2harkinian/files/2ship2harkinian.json new file mode 100644 index 0000000..87a4f88 --- /dev/null +++ b/nix/steam_deck/configuration/roles/2ship2harkinian/files/2ship2harkinian.json @@ -0,0 +1,15 @@ +{ + "CVars": { + "gInterpolationFPS": 60, + "gSettings": { + "InternalResolution": 2.0, + "MSAAValue": 2, + "OpenMenuBar": 0 + } + }, + "Window": { + "Fullscreen": { + "Enabled": true + } + } +}