modules: programs: steam: simplify wrapper
This commit is contained in:
parent
39a512bc0a
commit
4f6f483851
|
@ -1,6 +1,8 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.my.programs.steam;
|
cfg = config.my.programs.steam;
|
||||||
|
|
||||||
|
steam = pkgs.steam;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.my.programs.steam = with lib; {
|
options.my.programs.steam = with lib; {
|
||||||
|
@ -26,13 +28,13 @@ in
|
||||||
(pkgs.writeScriptBin "steam" ''
|
(pkgs.writeScriptBin "steam" ''
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
mkdir -p "${cfg.dataDir}"
|
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
|
# Same, for GOG and other such games
|
||||||
(pkgs.writeScriptBin "steam-run" ''
|
(pkgs.writeScriptBin "steam-run" ''
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
mkdir -p "${cfg.dataDir}"
|
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