ooknet/modules/home/workstation/gaming/options.nix
2024-11-01 12:47:49 +11:00

31 lines
657 B
Nix

{
lib,
config,
...
}: let
inherit (lib) mkIf mkEnableOption mkOption;
inherit (lib.types) str;
cfg = config.ooknet.gaming;
in {
options.ooknet.gaming = {
enable = mkEnableOption;
gamesPath = mkOption {
type = str;
default = "${config.home.homeDirectory}/Games";
description = "Location where games will be stored.";
};
prefixPath = mkOption {
type = str;
default = "${cfg.gamesPath}/prefixes";
};
compatDataPath = mkOption {
type = str;
default = "${cfg.prefixPath}/compatdata";
};
};
config = mkIf cfg.enable {
xdg.userDirs.XDG_GAMES_DIR = cfg.gamesPath;
};
}