diff options
Diffstat (limited to 'modules/games')
-rw-r--r-- | modules/games/default.nix | 9 | ||||
-rw-r--r-- | modules/games/lutris.nix | 5 | ||||
-rw-r--r-- | modules/games/mangohud.nix | 5 | ||||
-rw-r--r-- | modules/games/steam.nix | 5 |
4 files changed, 10 insertions, 14 deletions
diff --git a/modules/games/default.nix b/modules/games/default.nix index b70b94b..17090bb 100644 --- a/modules/games/default.nix +++ b/modules/games/default.nix @@ -1,16 +1,15 @@ { config, lib, ... }: -with lib; let cfg = config.nixfiles.modules.games; in { - imports = attrValues (modulesIn ./.); + imports = lib.modulesIn ./. |> lib.attrValues; - options.nixfiles.modules.games.enable32BitSupport = mkEnableOption "support for games"; + options.nixfiles.modules.games.enable32BitSupport = lib.mkEnableOption "support for games"; - config = mkMerge [ + config = lib.mkMerge [ { hardware.graphics.enable = true; } - (mkIf cfg.enable32BitSupport { + (lib.mkIf cfg.enable32BitSupport { services = { jack.alsa.support32Bit = config.services.jack.alsa.enable; pipewire.alsa.support32Bit = config.services.pipewire.alsa.enable; diff --git a/modules/games/lutris.nix b/modules/games/lutris.nix index d926971..c2b352e 100644 --- a/modules/games/lutris.nix +++ b/modules/games/lutris.nix @@ -4,14 +4,13 @@ pkgs, ... }: -with lib; let cfg = config.nixfiles.modules.games.lutris; in { - options.nixfiles.modules.games.lutris.enable = mkEnableOption "Lutris"; + options.nixfiles.modules.games.lutris.enable = lib.mkEnableOption "Lutris"; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { nixfiles.modules.games = { gamemode.enable = true; mangohud.enable = true; diff --git a/modules/games/mangohud.nix b/modules/games/mangohud.nix index 955f50c..0571073 100644 --- a/modules/games/mangohud.nix +++ b/modules/games/mangohud.nix @@ -1,12 +1,11 @@ { config, lib, ... }: -with lib; let cfg = config.nixfiles.modules.games.mangohud; in { - options.nixfiles.modules.games.mangohud.enable = mkEnableOption "MangoHud"; + options.nixfiles.modules.games.mangohud.enable = lib.mkEnableOption "MangoHud"; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { hm = { stylix.targets.mangohud.enable = false; diff --git a/modules/games/steam.nix b/modules/games/steam.nix index d8c6964..9d41b8f 100644 --- a/modules/games/steam.nix +++ b/modules/games/steam.nix @@ -4,14 +4,13 @@ pkgs, ... }: -with lib; let cfg = config.nixfiles.modules.games.steam; in { - options.nixfiles.modules.games.steam.enable = mkEnableOption "Steam runtime"; + options.nixfiles.modules.games.steam.enable = lib.mkEnableOption "Steam runtime"; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { nixfiles.modules = { common = { nix.allowedUnfreePackages = [ |