add gaming
This commit is contained in:
@@ -32,6 +32,14 @@
|
||||
greetd.enable = true;
|
||||
};
|
||||
|
||||
gaming = {
|
||||
steam.enable = true;
|
||||
lutris.enable = true;
|
||||
proton_ge.enable = true;
|
||||
gamemode.enable = true;
|
||||
mangohud.enable = true;
|
||||
};
|
||||
|
||||
# fix power buttons
|
||||
services.logind.settings.Login = {
|
||||
HandlePowerKey = "suspend";
|
||||
|
||||
@@ -5,5 +5,10 @@
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./steam
|
||||
./lutris
|
||||
./proton_ge
|
||||
./gamemode
|
||||
./mangohud
|
||||
];
|
||||
}
|
||||
|
||||
20
modules/desktop/gaming/gamemode/default.nix
Normal file
20
modules/desktop/gaming/gamemode/default.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.gaming.gamemode;
|
||||
in {
|
||||
options.gaming.gamemode = {
|
||||
enable = lib.mkEnableOption "enable lutris";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
# enable gamemode for game optimizations
|
||||
# requires setting launch option `gamemoderun %command%`
|
||||
programs.gamemode.enable = true;
|
||||
|
||||
};
|
||||
}
|
||||
18
modules/desktop/gaming/lutris/default.nix
Normal file
18
modules/desktop/gaming/lutris/default.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.gaming.lutris;
|
||||
in {
|
||||
options.gaming.lutris = {
|
||||
enable = lib.mkEnableOption "enable lutris";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
lutris
|
||||
];
|
||||
};
|
||||
}
|
||||
20
modules/desktop/gaming/mangohud/default.nix
Normal file
20
modules/desktop/gaming/mangohud/default.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.gaming.mangohud;
|
||||
in {
|
||||
options.gaming.mangohud = {
|
||||
enable = lib.mkEnableOption "enable lutris";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# preformance overlay
|
||||
# requires setting launch option `mangohud %command%`
|
||||
environment.systemPackages = with pkgs; [
|
||||
mangohud
|
||||
];
|
||||
};
|
||||
}
|
||||
26
modules/desktop/gaming/proton_ge/default.nix
Normal file
26
modules/desktop/gaming/proton_ge/default.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.gaming.proton_ge;
|
||||
in {
|
||||
options.gaming.proton_ge = {
|
||||
enable = lib.mkEnableOption "enable proton ge";
|
||||
};
|
||||
|
||||
|
||||
# this is an imperitive install after rebuild run `protonup`
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
protonup
|
||||
];
|
||||
|
||||
# tells `protonup` what path to use
|
||||
environment.sessionVariables = {
|
||||
STEAM_EXTRA_COMPACT_TOOLS_PATHS =
|
||||
"/home/blake/.steam/root/compatibilitytools.d";
|
||||
};
|
||||
};
|
||||
}
|
||||
20
modules/desktop/gaming/steam/default.nix
Normal file
20
modules/desktop/gaming/steam/default.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.gaming.steam;
|
||||
in {
|
||||
options.gaming.steam = {
|
||||
enable = lib.mkEnableOption "enable steam";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
# requires setting launch option `gamescope %command%`
|
||||
gamescopeSession.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user