1
0
Fork 0
This commit is contained in:
Lukas Wurzinger 2025-05-11 22:49:04 +02:00
parent be9fb9278e
commit b8af0e9761
No known key found for this signature in database
165 changed files with 1815 additions and 1431 deletions

View file

@ -0,0 +1,18 @@
{ config, lib, ... }:
let
cfg = config.profiles.gaming;
in
{
options.profiles.gaming = {
enable = lib.mkEnableOption "gaming";
};
imports = lib.optionals cfg.enable (lib.findModules { } [ ./profile ]);
config.assertions = lib.mkIf cfg.enable [
{
assertion = config.profiles.desktop.enable;
message = "The gaming profile depends on the desktop profile.";
}
];
}

View file

@ -0,0 +1,27 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profiles.gaming;
in
{
config = lib.mkIf cfg.enable {
programs.gamemode = {
enable = true;
settings = {
general = {
renice = 10;
};
custom = {
start = "${lib.getExe pkgs.libnotify} 'GameMode started'";
end = "${lib.getExe pkgs.libnotify} 'GameMode stopped'";
};
};
};
users.groups.gamemode.members = config.users.normalUsers;
};
}

View file

@ -0,0 +1,16 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profiles.gaming;
in
{
config = lib.mkIf cfg.enable {
environment.systemPackages = [
pkgs.prismlauncher
];
};
}

20
profiles/gaming/steam.nix Normal file
View file

@ -0,0 +1,20 @@
{
config,
lib,
...
}:
let
cfg = config.profiles.gaming;
in
{
config = lib.mkIf cfg.enable {
programs.steam = {
enable = true;
extest.enable = true;
protontricks.enable = true;
dedicatedServer.openFirewall = true;
remotePlay.openFirewall = true;
localNetworkGameTransfers.openFirewall = true;
};
};
}