Open sstarcher opened 6 months ago
Note: this is how they're handled in nix directly: https://nixos.wiki/wiki/Helm_and_Helmfile
My knowledge of nix is very limited working on that. I would have expected what I did above with
"kubernetes-helmPlugins.helm-diff@latest",
to be equivalent of what they recommended below in nix or are you saying I should create a flake and have it referenced by devbox?
{
environment.systemPackages = with pkgs; [
(wrapHelm kubernetes-helm {
plugins = with pkgs.kubernetes-helmPlugins; [
helm-secrets
helm-diff
helm-s3
helm-git
];
})
];
}
to be equivalent of what they recommended below in nix
It won't be equivalent. I believe jetpack would need to special case this.
I believe if you make a flake as you mentioned, this will work.
I'm on a m2 macbook. I tried searching for the relevant devbox/nix docs. The invocation of flake-utils.lib.eachDefaultSystem
when I hunted down the readme for that library.
With the config pulled from the nixos wiki I get the following error. I apologize for being a complete noob.
Error: error installing package path:.devbox/flakes
source: nix path-info exit code: 1, output: warning: creating lock file '/Users/jameshounshell/git/ml/helm-charts/.devbox/flakes/flake.lock'
error: flake 'path:/Users/jameshounshell/git/ml/helm-charts/.devbox/flakes' does not provide attribute 'packages.aarch64-darwin.default' or 'defaultPackage.aarch64-darwin'
, err: exit status 1
devbox.json
{
"$schema": "https://raw.githubusercontent.com/jetpack-io/devbox/0.10.3/.schema/devbox.schema.json",
"packages": [
"gh@latest",
"kubernetes-helm@latest",
"helm-docs@latest",
"pre-commit@latest",
"kubeconform@latest",
"path:.devbox/flakes"
],
"shell": {
"init_hook": [
"echo 'Welcome to devbox!' > /dev/null"
],
"scripts": {
"test": [
"echo \"Error: no test specified\" && exit 1"
]
}
}
}
./.devbox/flakes/flake.nix
{
description = "Nix flake for Helm";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/master";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system}; in
{
devShells.default = pkgs.mkShell {
name = "helm devShell";
nativeBuildInputs = [ pkgs.bashInteractive ];
buildInputs = with pkgs; [
(wrapHelm kubernetes-helm {
plugins = with pkgs.kubernetes-helmPlugins; [
helm-diff
helm-secrets
helm-s3
];
})
];
};
});
}
Oh my goodness I ditched the flake thing and got it to work by hackily supplying the HELM_PLUGIN environment variable
{
"$schema": "https://raw.githubusercontent.com/jetpack-io/devbox/0.10.3/.schema/devbox.schema.json",
"packages": [
"gh@latest",
"kubernetes-helm@latest",
"helm-docs@latest",
"pre-commit@latest",
"kubeconform@latest",
"kubernetes-helmPlugins.helm-unittest@0.3.5"
],
"env": {
"HELM_PLUGINS": "$PWD/.devbox/nix/profile/default"
},
"shell": {
"init_hook": [
"echo 'Welcome to devbox!' > /dev/null"
],
"scripts": {
"test": [
"echo \"Error: no test specified\" && exit 1"
]
}
}
}
What happened?
In my devbox global
Steps to reproduce
I would expect the plugin to be installed
Command
No response
devbox.json
Devbox version
0.9.1
Nix version
nix (Nix) 2.13.5
What system does this bug occur on?
Linux (x86-64)
Debug logs
No response