home

My NixOS systems configurations.
Log | Files | Refs | LICENSE

commit 92285764b72b8c8de09b4a8f75aaf66922ea937f
parent e30ac5f8f0f02fdcfb0be75834229f19402875a2
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Fri,  5 Nov 2021 17:44:21 +0100

tools/k8s.infra: "embedded" tools in k8s.infra…

… instead of having them in the shell definition (and having them to
load them all the time)

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

Diffstat:
Mshell.nix | 2--
Mtools/k8s.infra/default.nix | 9+++++++--
2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/shell.nix b/shell.nix @@ -18,10 +18,8 @@ pkgs.mkShell cachix morph niv - nixos-generators nixpkgs-fmt sops - libguestfs-with-appliance ]; shellHook = '' export NIX_PATH="nixpkgs=${pkgs.path}:nixos=${nixos.path}:nixos-unstable=${nixos-unstable.path}" diff --git a/tools/k8s.infra/default.nix b/tools/k8s.infra/default.nix @@ -1,11 +1,16 @@ -{ stdenv }: +{ pkgs, ... }: -stdenv.mkDerivation { +pkgs.stdenv.mkDerivation { name = "k8s.infra"; src = ./.; phases = [ "installPhase" "fixupPhase" ]; + buildInputs = with pkgs; [ + makeWrapper + ]; installPhase = '' mkdir -p $out $out/bin cp $src/k8s.infra.sh $out/bin/k8s.infra + + wrapProgram "$out/bin/k8s.infra" --prefix PATH : ${pkgs.lib.makeBinPath [ pkgs.nixos-generators pkgs.virtmanager pkgs.libguestfs-with-appliance pkgs.qemu pkgs.libvirt ]} ''; }