Files
NixOS/modules/dev/ruby/home.nix
2026-03-16 16:41:10 -06:00

40 lines
780 B
Nix

{
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.packages = feature.packages;
home.sessionVariables = {
GEM_HOME = "${config.xdg.dataHome}/ruby/gems";
GEM_PATH = "${config.xdg.dataHome}/ruby/gems";
GEM_SPEC_CACHE = "${config.xdg.dataHome}/ruby/specs";
};
})
];
}