# MANUAL: mkdir -p ~/.persist/.local/share/2ship/saves { config, lib, pkgs, ... }: { imports = [ ]; options.me = { ship2harkinian.enable = lib.mkOption { type = lib.types.bool; default = false; example = true; description = "Whether we want to install 2ship2harkinian."; }; }; config = lib.mkIf config.me.ship2harkinian.enable ( lib.mkMerge [ { allowedUnfree = [ "2ship2harkinian" ]; } (lib.mkIf config.me.graphical { home.packages = with pkgs; [ _2ship2harkinian ]; home.file.".local/share/2ship/2ship2harkinian.json" = { source = ./files/2ship2harkinian.json; }; home.persistence."/home/deck/.persist" = { directories = [ { 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 ''; }; }) ]; }) ] ); }