nixos/modules/packages/steam.nix

26 lines
786 B
Nix
Raw Normal View History

2024-04-25 15:16:32 +08:00
inputs:
{
2024-08-03 17:40:11 +08:00
options.nixos.packages.steam = let inherit (inputs.lib) mkOption types; in mkOption
{
type = types.nullOr (types.submodule {});
default = if inputs.config.nixos.system.gui.enable then {} else null;
};
config = let inherit (inputs.config.nixos.packages) steam; in inputs.lib.mkIf (steam != null)
2024-04-25 15:16:32 +08:00
{
programs.steam =
{
enable = true;
2024-07-31 02:13:24 +08:00
package = inputs.lib.mkIf (inputs.config.nixos.hardware.steamdeck == null) (inputs.pkgs.steam.override (prev:
2024-04-25 15:16:32 +08:00
{
steam = prev.steam.overrideAttrs (prev:
{
postInstall = prev.postInstall +
''
sed -i 's#Comment\[zh_CN\]=.*$#Comment\[zh_CN\]=思题慕®学习平台#' $out/share/applications/steam.desktop
'';
});
2024-07-31 02:13:24 +08:00
}));
2024-04-25 15:16:32 +08:00
};
};
}