{ config, options, lib, pkgs, rootPath, ... }: let vsConf = config.modules.desktop.apps.games.vintagestory; configDir = config.nixosConfig.configDir; in { options.modules.desktop.apps.games.vintagestory = { enable = lib.mkOption { type = lib.types.bool; default = false; }; }; config = lib.mkIf (vsConf.enable) { home.manager.xdg.mimeApps = { defaultApplications = { "x-scheme-handler/vintagestoryjoin" = [ "Vintagestory_url_connect.desktop" ]; "x-scheme-handler/vintagestorymodinstall" = [ "Vintagestory_url_mod.desktop" ]; }; }; home.packages = with pkgs; [ (callPackage (rootPath + /packages/vintagestory/default.nix) {}) ]; }; }