refactor(go): nixify 'GOPATH' environment variable

This commit is contained in:
2026-08-23 13:32:24 +02:00
parent 34205bf384
commit db31984573
2 changed files with 8 additions and 12 deletions
-4
View File
@@ -82,10 +82,6 @@ else
fi fi
# }}} # }}}
# Go {{{
export GOPATH="${XDG_DATA_HOME}/go"
# }}}
# Jupyter {{{ # Jupyter {{{
export JUPYTERLAB_DIR=$HOME/.local/share/jupyter/lab export JUPYTERLAB_DIR=$HOME/.local/share/jupyter/lab
# }}} # }}}
+8 -8
View File
@@ -5,18 +5,18 @@
... ...
}: }:
let
cfg = config.go;
in
{ {
options.go = { options.go = {
enable = lib.mkEnableOption "Go"; enable = lib.mkEnableOption "Go";
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf config.go.enable {
home.packages = with pkgs; [ home = {
go sessionVariables.GOPATH = "${config.xdg.dataHome}/go";
gopls packages = with pkgs; [
]; go
gopls
];
};
}; };
} }