51 lines
1.2 KiB
Nix
51 lines
1.2 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
|
|
{
|
|
imports = [ ];
|
|
|
|
options.me = {
|
|
steam.enable = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = false;
|
|
example = true;
|
|
description = "Whether we want to install steam.";
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf config.me.steam.enable (
|
|
lib.mkMerge [
|
|
(lib.mkIf config.me.graphical {
|
|
allowedUnfree = [
|
|
"steam"
|
|
"steam-original"
|
|
"steam-unwrapped"
|
|
"steam-run"
|
|
];
|
|
|
|
programs.steam = {
|
|
enable = true;
|
|
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
|
|
};
|
|
|
|
environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) {
|
|
hideMounts = true;
|
|
users.talexander = {
|
|
directories = [
|
|
".local/share/Steam"
|
|
".steam"
|
|
".factorio"
|
|
];
|
|
};
|
|
};
|
|
})
|
|
]
|
|
);
|
|
}
|