{ config, inputs, lib, osConfig ? null, pkgs, ... }: let hm = inputs.self.lib.hmModule { inherit config inputs osConfig ; optionPath = [ "dev" "ruby" ]; }; cfg = config.my.dev.ruby; feature = import ./common.nix { inherit pkgs; }; in { options.my.dev.ruby.enable = lib.mkEnableOption "Install Ruby tooling globally"; config = lib.mkMerge [ { my.dev.ruby.enable = lib.mkDefault hm.enabledByDefault; } (lib.mkIf cfg.enable { home = { inherit (feature) packages; sessionVariables = { GEM_HOME = "${config.xdg.dataHome}/ruby/gems"; GEM_PATH = "${config.xdg.dataHome}/ruby/gems"; GEM_SPEC_CACHE = "${config.xdg.dataHome}/ruby/specs"; }; }; }) ]; }