22 lines
413 B
Nix
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";
|
|
};
|
|
};
|
|
};
|
|
}
|