modules: programs: steam: use writeShellScriptBin
All checks were successful
ci/woodpecker/push/check Pipeline was successful

This commit is contained in:
Bruno BELANYI 2023-06-03 13:39:52 +01:00
parent 4f6f483851
commit 5d570dbf1e

View file

@ -25,14 +25,12 @@ in
environment.systemPackages = builtins.map lib.hiPrio [ environment.systemPackages = builtins.map lib.hiPrio [
# Respect XDG conventions, leave my HOME alone # Respect XDG conventions, leave my HOME alone
(pkgs.writeScriptBin "steam" '' (pkgs.writeShellScriptBin "steam" ''
#!/bin/sh
mkdir -p "${cfg.dataDir}" mkdir -p "${cfg.dataDir}"
HOME="${cfg.dataDir}" exec ${lib.getExe steam} "$@" HOME="${cfg.dataDir}" exec ${lib.getExe steam} "$@"
'') '')
# Same, for GOG and other such games # Same, for GOG and other such games
(pkgs.writeScriptBin "steam-run" '' (pkgs.writeShellScriptBin "steam-run" ''
#!/bin/sh
mkdir -p "${cfg.dataDir}" mkdir -p "${cfg.dataDir}"
HOME="${cfg.dataDir}" exec ${lib.getExe steam.run} "$@" HOME="${cfg.dataDir}" exec ${lib.getExe steam.run} "$@"
'') '')