games: Optimize configuration
This commit is contained in:
parent
a1d79de285
commit
dd7f79a874
4 changed files with 43 additions and 18 deletions
|
@ -26,7 +26,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
tmp.useTmpfs = true;
|
tmp.useTmpfs = true;
|
||||||
kernelPackages = pkgs.linuxPackages_xanmod_latest;
|
kernelPackages = pkgs.unstable.linuxPackages_xanmod_latest;
|
||||||
supportedFilesystems = [ "btfs" "vfat" "xfs" ];
|
supportedFilesystems = [ "btfs" "vfat" "xfs" ];
|
||||||
initrd = {
|
initrd = {
|
||||||
availableKernelModules = [ "nvme" "xhci_pci" "ahci"
|
availableKernelModules = [ "nvme" "xhci_pci" "ahci"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -19,7 +19,6 @@
|
||||||
|
|
||||||
boot.kernelParams = [
|
boot.kernelParams = [
|
||||||
"nvidia_drm.fbdev=1"
|
"nvidia_drm.fbdev=1"
|
||||||
"nvidia.NVreg_PreserveVideoMemoryAllocations=1"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
services.xserver.videoDrivers = [ "nvidia" ];
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
|
|
@ -1,25 +1,25 @@
|
||||||
{ pkgs, username, inputs, ... }:
|
{ pkgs, username, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
imports = [
|
||||||
|
./steam.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.gamescope.enable = true;
|
||||||
|
programs.gamemode.enable = true;
|
||||||
|
users.users."${username}".extraGroups = [ "gamemode" ];
|
||||||
|
|
||||||
|
nix.settings = inputs.aagl.nixConfig;
|
||||||
|
programs.anime-game-launcher.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
unstable.osu-lazer-bin
|
||||||
|
];
|
||||||
|
|
||||||
environment.persistence."/nix/persist" = {
|
environment.persistence."/nix/persist" = {
|
||||||
users."${username}".directories = [
|
users."${username}".directories = [
|
||||||
".local/share/steam_home"
|
|
||||||
".local/share/osu"
|
".local/share/osu"
|
||||||
".local/share/an-anime-game-launcher"
|
".local/share/an-anime-game-launcher"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
protonup-qt
|
|
||||||
protontricks
|
|
||||||
unstable.osu-lazer-bin
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.steam = {
|
|
||||||
enable = true;
|
|
||||||
gamescopeSession.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
nix.settings = inputs.aagl.nixConfig;
|
|
||||||
programs.anime-game-launcher.enable = true;
|
|
||||||
}
|
}
|
||||||
|
|
26
modules/nixos/multimedia/games/steam.nix
Normal file
26
modules/nixos/multimedia/games/steam.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{ pkgs, username, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.steam = {
|
||||||
|
enable = true;
|
||||||
|
gamescopeSession.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
protonup-qt
|
||||||
|
protontricks
|
||||||
|
];
|
||||||
|
|
||||||
|
# Sometimes a Steam game that runs natively on Linux
|
||||||
|
# creates a folder somewhere in ~/.local/share or ~/.config
|
||||||
|
# and in the usual case you would have to persist each game
|
||||||
|
# folder individually but since we set the nix home to this
|
||||||
|
# directory instead of the actual home directory, it all gets
|
||||||
|
# stored in here and by persisting the entire path this becomes
|
||||||
|
# a none issue.
|
||||||
|
environment.persistence."/nix/persist" = {
|
||||||
|
users."${username}".directories = [
|
||||||
|
".local/share/steam_home"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue