modularize steam
This commit is contained in:
parent
9f0e9811e3
commit
cbda46edd5
|
@ -8,7 +8,7 @@
|
|||
./terminal
|
||||
./neovim.nix
|
||||
./baseline.nix
|
||||
./gaming
|
||||
./gaming.nix
|
||||
./yubikey.nix
|
||||
./browsers.nix
|
||||
./gui
|
||||
|
|
|
@ -12,11 +12,6 @@ in {
|
|||
};
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [
|
||||
# Steam. todo: move to the steam module later
|
||||
(pkgs.callPackage ./package.nix {})
|
||||
pkgs.protonup
|
||||
pkgs.winetricks
|
||||
pkgs.protontricks
|
||||
pkgs.lutris
|
||||
pkgs.openrct2
|
||||
pkgs.prismlauncher
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
writeShellScriptBin,
|
||||
steam-run,
|
||||
steam,
|
||||
...
|
||||
}:
|
||||
writeShellScriptBin "steam" ''
|
||||
exec ${steam-run}/bin/steam-run ${steam}/bin/steam -console
|
||||
''
|
|
@ -14,5 +14,6 @@
|
|||
./users.nix
|
||||
./bluetooth.nix
|
||||
./net.nix
|
||||
./steam.nix
|
||||
];
|
||||
}
|
||||
|
|
31
sys/modules/steam.nix
Normal file
31
sys/modules/steam.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.local.sys.steam;
|
||||
in {
|
||||
options.local.sys.steam = {
|
||||
enable = mkEnableOption "steam settings";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
localNetworkGameTransfers.openFirewall = true;
|
||||
};
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs;
|
||||
[
|
||||
protontricks
|
||||
protonup
|
||||
protonup-ng
|
||||
winetricks
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -19,6 +19,7 @@
|
|||
graphics.enable = true;
|
||||
virtualisation.enable = true;
|
||||
androidSupport.enable = true;
|
||||
steam.enable = true;
|
||||
|
||||
users = {
|
||||
fabian = {
|
||||
|
|
Loading…
Reference in a new issue