mirror of
https://github.com/tboerger/nixos-config
synced 2025-02-21 23:21:08 +01:00
34 lines
497 B
Nix
34 lines
497 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";
|
|
};
|
|
};
|
|
};
|
|
}
|