Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/swoehrl-mw/nix-kubectl-gs

Basic nix flake to install the kubectl-gs plugin
https://github.com/swoehrl-mw/nix-kubectl-gs

devbox kubectl-gs nix-flake

Last synced: about 2 months ago
JSON representation

Basic nix flake to install the kubectl-gs plugin

Awesome Lists containing this project

README

        

# Nix Flake for kubectl-gs

This repository contains a very basic [Nix Flake](https://nixos.wiki/wiki/Flakes) providing the [Giantswarm Kubectl plugin](https://github.com/giantswarm/kubectl-gs) as a package. It is intended to be added to dev shells.

## Usage

To reference this flake use the following format: `github:swoehrl-mw/nix-kubectl-gs/v`. If you just want the latest version and don't care about version pinning, remove the `/v` part.

Example: `github:swoehrl-mw/nix-kubectl-gs/v4.6.0`

To use the package with [devbox](https://www.jetify.com/devbox/docs/), simply add the reference to your `devbox.json` `packages`:

```json
{
"packages": [
"kubectl@latest",
"github:swoehrl-mw/nix-kubectl-gs/v4.6.0"
]
}
```

To add the package to a classic [nix-shell](https://nix.dev/tutorials/first-steps/declarative-shell), use the following snippet in your `shell.nix`:

```nix
pkgs.mkShellNoCC {
packages = [
pkgs.kubectl
(builtins.getFlake "github:swoehrl-mw/nix-kubectl-gs/v4.6.0").packages.${builtins.currentSystem}.kubectl-gs
];
}
```

## Development

Steps to update the Flake to a new version:

1. Change the version in `calc_hashes.sh` and run the script
2. Edit `flake.nix`:
1. Paste the output of the script into the `source_hashes` block
2. Change the `pkg_version`
3. Commit and push the changes
4. Tag the commit with the new version