Added steam and flatpak modules. Fixed steam with impermanence

This commit is contained in:
Aleksandr Lebedev 2025-01-12 19:49:59 +01:00
parent 37f843170a
commit 47412f3ecf
7 changed files with 171 additions and 83 deletions

View file

@ -0,0 +1,29 @@
{
pkgs,
lib,
config,
hwconfig,
...
}: let
cfg = config.kk.steam;
in {
options.kk.steam = {
enable = lib.mkEnableOption "Enable steam";
};
config = lib.mkIf cfg.enable (
if hwconfig.useImpermanence
then {
kk.services.flatpak.enable = lib.mkForce true;
services.flatpak.packages = ["com.valvesoftware.Steam"];
}
else {
programs.steam = {
enable = !hwconfig.useImpermanence;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
};
}
);
}