{ config, pkgs, lib, ... }: let cfg = config.local.games; in { options.local.games = with lib; { mindustry.enable = mkEnableOption "mindustry"; widelands.enable = mkEnableOption "widelands"; unciv.enable = mkEnableOption "unciv"; freeciv.enable = mkEnableOption "freeciv"; endless-sky.enable = mkEnableOption "endless-sky"; }; config.home.packages = lib.optional cfg.mindustry.enable pkgs.unstable.mindustry ++ lib.optional cfg.widelands.enable pkgs.widelands ++ lib.optional cfg.unciv.enable pkgs.unstable.unciv ++ lib.optional cfg.freeciv.enable pkgs.unstable.freeciv ++ lib.optional cfg.endless-sky.enable pkgs.unstable.endless-sky; }