home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 230b103e941e713f7e42783615b863977fdebb6f
parent a2d4c2e047ede1f2fab36ff2d25034fecd1dc452
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Thu,  7 Oct 2021 17:38:55 +0200

users/vincent: add src/tektoncd direnv setup

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Musers/vincent/dev/default.nix | 3+++
Ausers/vincent/dev/src/tektoncd.envrc | 4++++
Ausers/vincent/dev/src/tektoncd.shell.nix | 23+++++++++++++++++++++++
3 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/users/vincent/dev/default.nix b/users/vincent/dev/default.nix @@ -48,4 +48,7 @@ onChange = "${pkgs.my.nr}/bin/nr dev"; }; + home.file."src/tektoncd/.envrc".source = ./src/tektoncd.envrc; + home.file."src/tektoncd/shell.nix".source = ./src/tektoncd.shell.nix; + } diff --git a/users/vincent/dev/src/tektoncd.envrc b/users/vincent/dev/src/tektoncd.envrc @@ -0,0 +1,4 @@ +export KO_DOCKER_REPO=gcr.io/vde-tekton + +use_nix +watch_file shell.nix diff --git a/users/vincent/dev/src/tektoncd.shell.nix b/users/vincent/dev/src/tektoncd.shell.nix @@ -0,0 +1,23 @@ +let + sources = import /etc/nixos/nix; + # pkgs = sources.nixpkgs { }; + pkgs = sources.pkgs-unstable { }; + my = import /etc/nixos/nix/packages { pkgs = pkgs; }; +in +pkgs.mkShell { + name = "tektoncd"; + buildInputs = with pkgs; [ + my.ko + my.oc + my.tkn + google-cloud-sdk + gron + ]; + shellHook = '' + export GOMODULE=on + export GOFLAGS="-mod=vendor" + export GOROOT=${pkgs.go}/share/go + export KUSTOMIZE_BIN=${pkgs.kustomize}/bin/kustomize + export KO_BIN=${my.ko}/bin/ko + ''; +}