move more modules to common section

This commit is contained in:
Noah Masur
2022-05-22 19:43:46 -04:00
parent df96ff6cea
commit 5b9058935d
9 changed files with 131 additions and 125 deletions

View File

@ -1,15 +1,8 @@
{ config, pkgs, lib, ... }:
{ config, pkgs, lib, ... }: {
with lib;
let cfg = config.modules.gaming.leagueoflegends;
options.gaming.leagueoflegends = lib.mkEnableOption "League of Legends";
in {
options.modules.gaming.leagueoflegends = {
enable = mkEnableOption "League of Legends";
};
config = mkIf cfg.enable {
config = lib.mkIf config.gaming.leagueoflegends {
# League of Legends anti-cheat
boot.kernel.sysctl = { "abi.vsyscall32" = 0; };

View File

@ -1,13 +1,8 @@
{ config, pkgs, lib, ... }:
{ config, pkgs, lib, ... }: {
with lib;
let cfg = config.modules.gaming.lutris;
options.gaming.lutris = lib.mkEnableOption "Lutris";
in {
options.modules.gaming.lutris = { enable = mkEnableOption "Lutris"; };
config = mkIf cfg.enable {
config = lib.mkIf (config.gaming.lutris || config.gaming.leagueoflegends) {
environment.systemPackages = with pkgs; [ lutris amdvlk wine ];
};

View File

@ -1,13 +1,8 @@
{ config, pkgs, lib, ... }:
{ config, pkgs, lib, ... }: {
with lib;
let cfg = config.modules.gaming.steam;
options.gaming.steam = lib.mkEnableOption "Steam";
in {
options.modules.gaming.steam = { enable = mkEnableOption "Steam"; };
config = mkIf cfg.enable {
config = lib.mkIf config.gaming.steam {
hardware.steam-hardware.enable = true;
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [ steam ];