Switch to deploying 2ship2harkinian config file and fix launching it from KDE plasma's start menu.

This commit is contained in:
Tom Alexander 2025-02-15 12:15:58 -05:00
parent 5d4ebf90b3
commit 381e3fb591
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 46 additions and 3 deletions

View File

@ -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
'';
};
})
];
})
]
);

View File

@ -0,0 +1,15 @@
{
"CVars": {
"gInterpolationFPS": 60,
"gSettings": {
"InternalResolution": 2.0,
"MSAAValue": 2,
"OpenMenuBar": 0
}
},
"Window": {
"Fullscreen": {
"Enabled": true
}
}
}