modules: programs: steam: simplify wrapper
This commit is contained in:
parent
39a512bc0a
commit
4f6f483851
|
@ -1,6 +1,8 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.my.programs.steam;
|
||||
|
||||
steam = pkgs.steam;
|
||||
in
|
||||
{
|
||||
options.my.programs.steam = with lib; {
|
||||
|
@ -26,13 +28,13 @@ in
|
|||
(pkgs.writeScriptBin "steam" ''
|
||||
#!/bin/sh
|
||||
mkdir -p "${cfg.dataDir}"
|
||||
HOME="${cfg.dataDir}" exec ${pkgs.steam}/bin/steam "$@"
|
||||
HOME="${cfg.dataDir}" exec ${lib.getExe steam} "$@"
|
||||
'')
|
||||
# Same, for GOG and other such games
|
||||
(pkgs.writeScriptBin "steam-run" ''
|
||||
#!/bin/sh
|
||||
mkdir -p "${cfg.dataDir}"
|
||||
HOME="${cfg.dataDir}" exec ${pkgs.steam-run}/bin/steam-run "$@"
|
||||
HOME="${cfg.dataDir}" exec ${lib.getExe steam.run} "$@"
|
||||
'')
|
||||
];
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue