treewide: cleanup config with enable options
This commit is contained in:
parent
d469c5fa79
commit
0a387960a2
28 changed files with 420 additions and 358 deletions
63
system/gaming.nix
Normal file
63
system/gaming.nix
Normal file
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.my.gaming.enable = lib.mkEnableOption { };
|
||||
|
||||
config = lib.mkIf config.my.gaming.enable {
|
||||
programs.steam.enable = true;
|
||||
programs.steam.extraPackages =
|
||||
config.fonts.packages
|
||||
++ (with pkgs; [
|
||||
capitaine-cursors
|
||||
bibata-cursors
|
||||
mangohud
|
||||
xdg-user-dirs
|
||||
gamescope
|
||||
|
||||
# gamescope compatibility??
|
||||
xorg.libXcursor
|
||||
xorg.libXi
|
||||
xorg.libXinerama
|
||||
xorg.libXScrnSaver
|
||||
libpng
|
||||
libpulseaudio
|
||||
libvorbis
|
||||
stdenv.cc.cc.lib
|
||||
libkrb5
|
||||
keyutils
|
||||
]);
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
protontricks
|
||||
bottles
|
||||
inputs.dzgui-nix.packages.${pkgs.system}.default
|
||||
];
|
||||
|
||||
programs.gamemode = {
|
||||
enable = true;
|
||||
enableRenice = true;
|
||||
settings = {
|
||||
general = {
|
||||
renice = 10;
|
||||
};
|
||||
|
||||
# Warning: GPU optimisations have the potential to damage hardware
|
||||
gpu = {
|
||||
apply_gpu_optimisations = "accept-responsibility";
|
||||
gpu_device = 0;
|
||||
amd_performance_level = "high";
|
||||
};
|
||||
|
||||
custom = {
|
||||
start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'";
|
||||
end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue