Compare commits

..

No commits in common. "2dcb9e51f5fca98bdc9e431aa385acb246cd9295" and "267178d224650e0ab62b54a47d7e695515316702" have entirely different histories.

4 changed files with 71 additions and 9 deletions

17
overlays/steam.nix Normal file
View File

@ -0,0 +1,17 @@
self: super:
let
baseConfig = {
allowUnfree = true;
};
nixpkgs-steam-56 = import (super.fetchFromGitHub {
owner = "nyanloutre";
repo = "nixpkgs";
rev = "7af3a85d8d1a91b57b6cdee0b2e5d88981f310fa";
sha256 = "1rcd0nw8k1pcp80zm8kyhk288dj5ifmxhpacm1wi5hfnhw194w1g";
}) {config = baseConfig;};
in
{
steam_primus = nixpkgs-steam-56.steamPackages.steam-chrootenv.override {
withPrimus = true;
};
}

View File

@ -0,0 +1,42 @@
self: super:
{
steamcontroller-udev-rules = super.writeTextFile {
name = "steamcontroller-udev-rules";
text = ''
# This rule is needed for basic functionality of the controller in Steam and keyboard/mouse emulation
SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", MODE="0666"
# This rule is necessary for gamepad emulation;
KERNEL=="uinput", MODE="0660", GROUP="users", OPTIONS+="static_node=uinput"
# Valve HID devices over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="28de", MODE="0666"
# Valve HID devices over bluetooth hidraw
KERNEL=="hidraw*", KERNELS=="*28DE:*", MODE="0666"
# DualShock 4 over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="05c4", MODE="0666"
# DualShock 4 wireless adapter over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0ba0", MODE="0666"
# DualShock 4 Slim over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="09cc", MODE="0666"
# DualShock 4 over bluetooth hidraw
KERNEL=="hidraw*", KERNELS=="*054C:05C4*", MODE="0666"
# DualShock 4 Slim over bluetooth hidraw
KERNEL=="hidraw*", KERNELS=="*054C:09CC*", MODE="0666"
# Nintendo Switch Pro Controller over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="2009", MODE="0666"
# Nintendo Switch Pro Controller over bluetooth hidraw
KERNEL=="hidraw*", KERNELS=="*057E:2009*", MODE="0666"
'';
destination = "/etc/udev/rules.d/60-steamcontroller.rules";
};
}

View File

@ -12,6 +12,8 @@
];
nixpkgs.overlays = [
(import ../../overlays/steam.nix)
(import ../../overlays/steamcontroller-udev-rules.nix)
(import ../../overlays/ledger-udev-rules.nix)
];
@ -21,21 +23,15 @@
boot.tmpOnTmpfs = true;
boot.plymouth.enable = true;
# NVIDIA
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia.optimus_prime.enable = true;
hardware.nvidia.modesetting.enable = true;
hardware.nvidia.optimus_prime.nvidiaBusId = "PCI:1:0:0";
hardware.nvidia.optimus_prime.intelBusId = "PCI:0:2:0";
hardware.bumblebee.enable = true;
# For Steam
hardware.opengl.driSupport32Bit = true;
hardware.pulseaudio.support32Bit = true;
hardware.steam-hardware.enable = true;
hardware.u2f.enable = true;
services.udev.packages = with pkgs; [
steamcontroller-udev-rules
ledger-udev-rules
];
@ -69,6 +65,7 @@
firefox
chromium
torbrowser
qutebrowser
tdesktop
@ -103,7 +100,7 @@
vlc
kodiPlain
steam
steam_primus
sc-controller
steam-run
minecraft

View File

@ -22,6 +22,12 @@
fsType = "vfat";
};
fileSystems."/mnt/medias_loutreos" = {
device = "192.168.20.1:/mnt/medias";
fsType = "nfs";
options = ["x-systemd.automount" "noauto"];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/156cd5e8-715c-48a5-9df4-14565227a6c9"; }
];