diff --git a/hosts/pinwheel/modules/work/default.nix b/hosts/pinwheel/modules/work/default.nix index 76efbc1..109afd0 100644 --- a/hosts/pinwheel/modules/work/default.nix +++ b/hosts/pinwheel/modules/work/default.nix @@ -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; }; diff --git a/secrets/pinwheel/work-go-private.age b/secrets/pinwheel/work-go-private.age new file mode 100644 index 0000000..b037199 --- /dev/null +++ b/secrets/pinwheel/work-go-private.age @@ -0,0 +1,8 @@ +age-encryption.org/v1 +-> ssh-ed25519 vxPbZg 8QovjrbJr0uZHNSgQXyf1qQamlUYTgjLIShj+ut9ZSo +5uLXL9SbVx7iBCtkDIx3PZ62BFprY/iLrUrzL9nZpJM +-> ssh-ed25519 ek+b7Q 0bOd4IKJ4b9HoEJ3pJSbfyoz4vXCqocbkNGdw8xS4Fg +cAKDDmYEo1PpkpqRJBACxFxm0qiMDBV4UXqFDWrCcmY +--- Sh0Krr1Tn6t7izUn1TRG1maiRjCQtPridpYNhcfslMM +{2_Ù­U,Ì›H·±ä )êOß©šëUpiÌÄSÏ6Ü«` +Ÿ¡ðIå“{~U’µ8Žx‘sâ‡^ ¬'<Ë Š \ No newline at end of file diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 052dfb1..a6d330f 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -17,6 +17,7 @@ in { "pinwheel/work-gitconfig.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-production-ovpn.age".publicKeys = [ pinwheel alex ];