2025-02-15 11:40:09 -05:00
# MANUAL: mkdir -p ~/.persist/.local/share/soh/Save
2025-02-13 18:40:35 -05:00
{
config ,
lib ,
pkgs ,
. . .
} :
2025-02-15 20:22:29 -05:00
let
steam_shipwright = pkgs . writeScriptBin " s t e a m _ s o h " ''
export LD_LIBRARY_PATH = " $ L D _ L I B R A R Y _ P A T H : ${ pkgs . libglvnd } / l i b "
exec $ { pkgs . shipwright } /bin/soh
'' ;
in
2025-02-13 18:40:35 -05:00
{
imports = [ ] ;
options . me = {
shipwright . enable = lib . mkOption {
type = lib . types . bool ;
default = false ;
example = true ;
description = " W h e t h e r w e w a n t t o i n s t a l l s h i p w r i g h t . " ;
} ;
} ;
config = lib . mkIf config . me . shipwright . enable (
lib . mkMerge [
{
allowedUnfree = [ " s h i p w r i g h t " ] ;
}
( lib . mkIf config . me . graphical {
home . packages = with pkgs ; [
2025-02-15 11:51:50 -05:00
shipwright
2025-02-15 20:22:29 -05:00
steam_shipwright
2025-02-13 18:40:35 -05:00
] ;
2025-02-15 11:40:09 -05:00
home . file . " . l o c a l / s h a r e / s o h / s h i p o f h a r k i n i a n . j s o n " = {
source = ./files/shipofharkinian.json ;
} ;
2025-02-13 20:10:59 -05:00
home . persistence . " / h o m e / d e c k / . p e r s i s t " = {
directories = [
{
2025-02-15 11:40:09 -05:00
directory = " . l o c a l / s h a r e / s o h / S a v e " ;
2025-02-13 20:10:59 -05:00
method = " s y m l i n k " ;
}
] ;
} ;
2025-02-15 11:40:09 -05:00
home . persistence . " / h o m e / d e c k / . s t a t e " = {
files = [
" . l o c a l / s h a r e / s o h / o o t . o t r "
] ;
} ;
2025-02-15 11:51:50 -05:00
nixpkgs . overlays = [
( final : prev : {
shipwright = pkgs . buildEnv {
name = prev . shipwright . name ;
paths = [
( config . lib . nixGL . wrap prev . shipwright )
] ;
extraOutputsToInstall = [
" m a n "
" d o c "
" i n f o "
] ;
# 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/soh.desktop
'' ;
} ;
} )
] ;
2025-02-13 18:40:35 -05:00
} )
]
) ;
}