commit 7e8d4b7aee902cf34b5d0139552f6cd1d11d71b8 parent fba15faacf9edfac1555bb4ae318ad9c3cbcadfe Author: Vincent Demeester <vincent@sbr.pm> Date: Fri, 10 Dec 2021 11:34:33 +0100 users/vincent: add osp envrc/shell.nix Signed-off-by: Vincent Demeester <vincent@sbr.pm> Diffstat:
M | users/vincent/dev/default.nix | | | 5 | ++++- |
A | users/vincent/dev/src/osp.envrc | | | 4 | ++++ |
A | users/vincent/dev/src/osp.shell.nix | | | 25 | +++++++++++++++++++++++++ |
3 files changed, 33 insertions(+), 1 deletion(-)
diff --git a/users/vincent/dev/default.nix b/users/vincent/dev/default.nix @@ -48,7 +48,10 @@ onChange = "${pkgs.my.nr}/bin/nr dev"; }; + # Upstream Tekton home.file."src/tektoncd/.envrc".source = ./src/tektoncd.envrc; home.file."src/tektoncd/shell.nix".source = ./src/tektoncd.shell.nix; - + # Downstream OSP + home.file."src/osp/.envrc".source = ./src/osp.envrc; + home.file."src/osp/shell.nix".source = ./src/osp.shell.nix; } diff --git a/users/vincent/dev/src/osp.envrc b/users/vincent/dev/src/osp.envrc @@ -0,0 +1,4 @@ +use_nix +watch_file shell.nix +watch_file /etc/nixos/nix/sources.json +watch_file /etc/nixos/nix/default.nix diff --git a/users/vincent/dev/src/osp.shell.nix b/users/vincent/dev/src/osp.shell.nix @@ -0,0 +1,25 @@ +let + sources = import /etc/nixos/nix; + # pkgs = sources.nixpkgs { }; + pkgs = sources.pkgs-unstable { }; + my = import /etc/nixos/nix/packages { pkgs = pkgs; }; + go = pkgs.go_1_16; +in +pkgs.mkShell { + name = "osp"; + buildInputs = with pkgs; [ + go + my.oc + my.tkn + gron + yq-go + python39Packages.pyaml + ]; + shellHook = '' + export GOMODULE=on + export GOFLAGS="-mod=vendor" + export GOROOT=${go}/share/go + export GOMAXPROCS=8 + export KUSTOMIZE_BIN=${pkgs.kustomize}/bin/kustomize + ''; +}