Migrated from import based to config based
This commit is contained in:
31
modules/system/applications/steam.nix
Normal file
31
modules/system/applications/steam.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.settings.applications.steam;
|
||||
in {
|
||||
options = {
|
||||
settings.applications.steam.enable = lib.mkOption {
|
||||
type = with lib.types; bool;
|
||||
description = ''
|
||||
Enable steam
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
||||
"steam"
|
||||
"steam-original"
|
||||
"steam-run"
|
||||
];
|
||||
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user