Files
NixOS/modules/dev/go/home.nix
Danilo Reyes ba7acaf360 emacs-vm fix
2026-03-23 16:19:23 -06:00

38 lines
645 B
Nix

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