mirror of
https://github.com/tboerger/nixos-config
synced 2026-09-12 13:41:25 +02:00
40 lines
507 B
Nix
40 lines
507 B
Nix
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
options,
|
|
...
|
|
}:
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.profile.programs.golang;
|
|
|
|
in
|
|
{
|
|
options = {
|
|
profile = {
|
|
programs = {
|
|
golang = {
|
|
enable = mkEnableOption "Golang";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
home = {
|
|
sessionPath = [ "$HOME/Golang/bin" ];
|
|
};
|
|
|
|
programs = {
|
|
go = {
|
|
enable = true;
|
|
package = pkgs.go;
|
|
goPath = "Golang";
|
|
goBin = "Golang/bin";
|
|
};
|
|
};
|
|
};
|
|
}
|