more moving
This commit is contained in:
@@ -1 +1 @@
|
||||
{ ... }: { imports = [ ./amd ./nvidia ]; }
|
||||
{ ... }: { imports = [ ./amd ./nvidia ./gaming ]; }
|
||||
|
||||
48
share/gaming/default.nix
Normal file
48
share/gaming/default.nix
Normal file
@@ -0,0 +1,48 @@
|
||||
{ lib, pkgs, config, ... }:
|
||||
with lib;
|
||||
let cfg = config.share.gaming;
|
||||
in {
|
||||
imports = [ ./options.nix ];
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Network option required using sysctl to let Ubisoft Connect work as of 7-12-2023
|
||||
boot.kernel.sysctl."net.ipv4.tcp_mtu_probing" = 1;
|
||||
|
||||
# Configure programs
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
# Open ports in the firewall for Steam Remote Play
|
||||
remotePlay.openFirewall = true;
|
||||
# Open ports in the firewall for Source Dedicated Server
|
||||
dedicatedServer.openFirewall = true;
|
||||
};
|
||||
|
||||
# Hardware configs
|
||||
hardware = {
|
||||
# Xbox controllers
|
||||
xpadneo.enable = true;
|
||||
|
||||
# Steam udev rules for remote play
|
||||
steam-hardware.enable = true;
|
||||
};
|
||||
|
||||
# Configure nixpkgs
|
||||
nixpkgs.config.packageOverrides = pkgs: {
|
||||
steam = pkgs.steam.override {
|
||||
extraPkgs = pkgs:
|
||||
with pkgs; [
|
||||
xorg.libXcursor
|
||||
xorg.libXi
|
||||
xorg.libXinerama
|
||||
xorg.libXScrnSaver
|
||||
libpng
|
||||
libpulseaudio
|
||||
libvorbis
|
||||
stdenv.cc.cc.lib
|
||||
libkrb5
|
||||
keyutils
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
6
share/gaming/options.nix
Normal file
6
share/gaming/options.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{ lib, ... }:
|
||||
with lib; {
|
||||
options.share.gaming = {
|
||||
enable = mkEnableOption "enable gaming stuffs";
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user