about summary refs log tree commit diff
path: root/home/go/default.nix
blob: 40c65f0d0797fdb1574b8e0f5aa6d8164ce61eba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{ lib, config, pkgs, ... }:
let cfg = config.my.home.go;
in
{
  options.my.home.go = with lib; {
    enable = mkEnableOption "go configuration";
  };

  config = lib.mkIf cfg.enable {
    programs.go = {
      enable = true;
      goPath = ".local/share/pkg.go";
      goBin = ".local/bin.go";
      goPrivate = [ "git.fcuny.net" "golang.fcuny.net" ];
      package = pkgs.go_1_18;
    };
    home.packages = with pkgs; [ gopls go-tools ];
    home.sessionPath = [ config.home.sessionVariables.GOBIN ];
  };
}