pinwheel: Add go private environment variable for work

This commit is contained in:
Alexander Heldt
2024-05-04 17:56:26 +02:00
parent c46a02af61
commit 6ae7f29f73
3 changed files with 22 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
{ lib, config, ... }:
{ pkgs, lib, config, ... }:
let
gitEnabled = config.mod.git.enable;
goEnabled = config.mod.go.enable;
openvpnEnabled = config.mod.openvpn.enable;
in
{
@@ -10,6 +11,10 @@ in
GITHUB_TOKEN="$(${pkgs.coreutils}/bin/cat ${config.age.secrets.work-github-token.path})";
};
programs.go = lib.mkIf goEnabled {
goPrivate = [ "$(${pkgs.coreutils}/bin/cat ${config.age.secrets.work-go-private.path})" ];
};
programs.git = lib.mkIf gitEnabled {
includes = [
{
@@ -51,6 +56,13 @@ in
group = "users";
};
"work-go-private" = lib.mkIf goEnabled {
file = ../../../../secrets/pinwheel/work-go-private.age;
path = "/home/alex/code/work/.work-go-private";
owner = "alex";
group = "users";
};
"work-staging-ovpn" = lib.mkIf openvpnEnabled {
file = ../../../../secrets/pinwheel/work-staging-ovpn.age;
};