Personal Nix setup
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 67 lines 1.7 kB view raw
1{ lib, config, inputs, pkgs, user, ... }: 2 3with lib; 4let 5 cfg = config.modules.apps; 6in { 7 options.modules.apps.games = { 8 enable = mkOption { 9 default = false; 10 example = true; 11 description = "Whether to enable games."; 12 type = types.bool; 13 }; 14 }; 15 16 config = mkIf (cfg.enable && cfg.games.enable) { 17 boot = { 18 kernel.sysctl."kernel.unprivileged_userns_clone" = true; 19 kernelModules = [ "ntsync" ]; 20 }; 21 22 environment.sessionVariables = { 23 PROTONPATH = "${pkgs.proton-ge-bin.steamcompattool}/"; 24 PROTON_ENABLE_WAYLAND = mkDefault 1; 25 PROTON_USE_NTSYNC = mkDefault 1; 26 }; 27 28 services.udev = { 29 packages = [ 30 (pkgs.writeTextFile { 31 name = "ntsync-udev-rules"; 32 text = ''KERNEL=="ntsync", MODE="0660", TAG+="uaccess"''; 33 destination = "/etc/udev/rules.d/70-ntsync.rules"; 34 }) 35 ]; 36 extraRules = '' 37 SUBSYSTEM=="input", ATTRS{idVendor}=="045e", ATTRS{idProduct}=="02dd", MODE="0660", GROUP="input" 38 ''; 39 }; 40 41 hardware = { 42 steam-hardware.enable = true; 43 }; 44 45 users.users."${user}".extraGroups = [ "gamemode" ]; 46 47 environment.systemPackages = [ 48 (pkgs.lutris.override { 49 extraPkgs = (pkgs: with pkgs; [ gamemode ]); 50 }) 51 ]; 52 53 programs = { 54 gamemode.enable = true; 55 steam = { 56 enable = true; 57 package = pkgs.steam.override { 58 extraPkgs = pkgs: [ pkgs.gamemode ]; 59 }; 60 remotePlay.openFirewall = true; 61 extraCompatPackages = [ pkgs.proton-ge-bin ]; 62 }; 63 }; 64 65 networking.hosts."0.0.0.0" = [ "ipv6check-http.steamserver.net" ]; 66 }; 67}