pinwheel: Add go private environment variable for work
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user