Last active
April 30, 2024 18:21
-
-
Save dln/5653f1319f41fcae65e7db38f2dd419b to your computer and use it in GitHub Desktop.
Minimal example of using nix flake as "devshell" with direnv for a portable environment of various handy tools
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if has nix; then | |
use flake | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
description = "my k8s project"; | |
inputs = { | |
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; | |
flake-utils.url = "github:numtide/flake-utils"; | |
}; | |
outputs = { nixpkgs, flake-utils, ... }: flake-utils.lib.eachDefaultSystem (system: | |
let | |
pkgs = import nixpkgs { system = "x86_64-linux"; config.allowUnfree = true; }; | |
in | |
{ | |
devShell = pkgs.mkShell { | |
buildInputs = (with pkgs; [ | |
argocd | |
bat | |
cue | |
curl | |
fzf | |
gatekeeper | |
go-task | |
jq | |
jless | |
kapp | |
kail | |
krew | |
kubectl | |
kubectl-cnpg | |
kubectl-view-secret | |
kubelogin-oidc | |
kubernetes-helm | |
k9s | |
kubelogin-oidc | |
kustomize | |
miller | |
minio-client | |
talosctl | |
packer | |
vault-bin | |
]); | |
}; | |
} | |
); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# yaml-language-server: $schema=https://taskfile.dev/schema.json | |
version: "3" | |
tasks: | |
nix:update: nix flake update |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment