add steam module

sadly this has to be a system package until we find a non shitty way of
installing in through hm
This commit is contained in:
Fabian Montero 2025-01-27 19:57:02 -06:00
parent 6d0c611eae
commit 0473f830f6
Signed by: fabian
GPG key ID: 1FFAC35E1798174F
3 changed files with 75 additions and 1 deletions

View file

@ -1 +1,10 @@
{}
{
config,
lib,
pkgs,
...
}: {
imports = [
./trash
];
}

10
nixos/trash/default.nix Normal file
View file

@ -0,0 +1,10 @@
{
config,
lib,
pkgs,
...
}: {
imports = [
./steam
];
}

View file

@ -0,0 +1,55 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.options.trivium.trash.steam;
in {
options.trivium.trash.steam = {
enable = mkEnableOption "steam settings";
compatibilityPackages = mkOption {
type = types.bool;
default = true;
description = "Enable additional compatibility packages (protontricks, protonup, etc.)";
};
remotePlayOpenFirewall = mkOption {
type = types.bool;
default = false;
description = "Open firewall for Steam Remote Play";
};
dedicatedServerOpenFirewall = mkOption {
type = types.bool;
default = false;
description = "Open firewall for Steam Dedicated Server";
};
localNetworkGameTransfersOpenFirewall = mkOption {
type = types.bool;
default = false;
description = "Open firewall for Steam Local Network Game Transfers";
};
};
config = mkIf cfg.enable {
programs.steam = {
enable = true;
remotePlay.openFirewall = cfg.remotePlayOpenFirewall;
dedicatedServer.openFirewall = cfg.dedicatedServerOpenFirewall;
localNetworkGameTransfers.openFirewall = cfg.localNetworkGameTransfersOpenFirewall;
};
environment = mkIf cfg.compatibilityPackages {
systemPackages = with pkgs; [
protontricks
protonup
protonup-ng
winetricks
];
};
};
}