nixcfg/modules/nixos/tools/go/default.nix
2024-01-11 10:31:04 +00:00

22 lines
413 B
Nix

{ options, config, pkgs, lib, ... }:
with lib;
with lib.plusultra;
let
cfg = config.plusultra.tools.go;
in
{
options.plusultra.tools.go = with types; {
enable = mkBoolOpt false "Whether or not to enable Go support.";
};
config = mkIf cfg.enable {
environment = {
systemPackages = with pkgs; [ go gopls ];
sessionVariables = {
GOPATH = "$HOME/work/go";
};
};
};
}