Format with nixfmt-rfc

This commit is contained in:
DashieTM 2024-08-25 19:10:41 +02:00
parent 8c9f699269
commit a90a9c3a8e
60 changed files with 1756 additions and 1039 deletions

View file

@ -1,4 +1,11 @@
{ lib, config, options, pkgs, ... }: {
{
lib,
config,
options,
pkgs,
...
}:
{
options.mods.gaming = {
enable = lib.mkOption {
default = false;
@ -7,7 +14,14 @@
description = "Enabled gaming related features.";
};
tools = lib.mkOption {
default = with pkgs; [ gamemode steam lutris wine adwsteamgtk heroic ];
default = with pkgs; [
gamemode
steam
lutris
wine
adwsteamgtk
heroic
];
example = [ ];
type = with lib.types; listOf package;
description = "Install gaming related packages";
@ -34,8 +48,7 @@
default = true;
example = false;
type = lib.types.bool;
description =
"Whether to use GPU performance setting. NOTE: this is at your own risk!";
description = "Whether to use GPU performance setting. NOTE: this is at your own risk!";
};
gpu_device = lib.mkOption {
default = 0;
@ -44,8 +57,8 @@
description = "Your gpu device.(Physical id of lshw)";
};
};
config = lib.mkIf config.mods.gaming.enable
(lib.optionalAttrs (options ? environment.systemPackages) {
config = lib.mkIf config.mods.gaming.enable (
lib.optionalAttrs (options ? environment.systemPackages) {
environment.systemPackages = config.mods.gaming.tools;
programs.steam.enable = config.mods.gaming.steam;
@ -53,7 +66,9 @@
programs.gamemode = {
enableRenice = true;
settings = {
general = { governor = "performance"; };
general = {
governor = "performance";
};
gpu = lib.mkIf config.mods.gaming.gpu_optimization {
apply_gpu_optimisations = "accept-responsibility";
gpu_device = config.mods.gaming.gpu_device;
@ -66,5 +81,6 @@
};
};
};
});
}
);
}