Format with nixfmt-rfc
This commit is contained in:
parent
8c9f699269
commit
a90a9c3a8e
60 changed files with 1756 additions and 1039 deletions
|
|
@ -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 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue