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 let
gitEnabled = config.mod.git.enable; gitEnabled = config.mod.git.enable;
goEnabled = config.mod.go.enable;
openvpnEnabled = config.mod.openvpn.enable; openvpnEnabled = config.mod.openvpn.enable;
in in
{ {
@@ -10,6 +11,10 @@ in
GITHUB_TOKEN="$(${pkgs.coreutils}/bin/cat ${config.age.secrets.work-github-token.path})"; 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 { programs.git = lib.mkIf gitEnabled {
includes = [ includes = [
{ {
@@ -51,6 +56,13 @@ in
group = "users"; 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 { "work-staging-ovpn" = lib.mkIf openvpnEnabled {
file = ../../../../secrets/pinwheel/work-staging-ovpn.age; file = ../../../../secrets/pinwheel/work-staging-ovpn.age;
}; };

View File

@@ -0,0 +1,8 @@
age-encryption.org/v1
-> ssh-ed25519 vxPbZg 8QovjrbJr0uZHNSgQXyf1qQamlUYTgjLIShj+ut9ZSo
5uLXL9SbVx7iBCtkDIx3PZ62BFprY/iLrUrzL9nZpJM
-> ssh-ed25519 ek+b7Q 0bOd4IKJ4b9HoEJ3pJSbfyoz4vXCqocbkNGdw8xS4Fg
cAKDDmYEo1PpkpqRJBACxFxm0qiMDBV4UXqFDWrCcmY
--- Sh0Krr1Tn6t7izUn1TRG1maiRjCQtPridpYNhcfslMM
{2_٭U,<2C><13>H<EFBFBD><48><EFBFBD>
)<29><4F><DFA9>Upi<70><69>S<EFBFBD>6ܫ`

View File

@@ -17,6 +17,7 @@ in {
"pinwheel/work-gitconfig.age".publicKeys = [ pinwheel alex ]; "pinwheel/work-gitconfig.age".publicKeys = [ pinwheel alex ];
"pinwheel/work-github-token.age".publicKeys = [ pinwheel alex ]; "pinwheel/work-github-token.age".publicKeys = [ pinwheel alex ];
"pinwheel/work-go-private.age".publicKeys = [ pinwheel alex ];
"pinwheel/work-staging-ovpn.age".publicKeys = [ pinwheel alex ]; "pinwheel/work-staging-ovpn.age".publicKeys = [ pinwheel alex ];
"pinwheel/work-production-ovpn.age".publicKeys = [ pinwheel alex ]; "pinwheel/work-production-ovpn.age".publicKeys = [ pinwheel alex ];