Skip to content

Commit

Permalink
switch from shell.nix to flake.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
vasu1124 committed Mar 10, 2024
1 parent f3465af commit c3f7b9d
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
use_nix
use_flake
27 changes: 27 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 68 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
SPDX-FileCopyrightText: 2024 vasu1124
SPDX-License-Identifier: Apache-2.0
*/
{
description = "Nix flake for introspect";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};

outputs = { self, nixpkgs, ... }:
let
pname = "introspect";

# System types to support.
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];

# Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;

# Nixpkgs instantiated for supported system types.
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });

in
{
# Add dependencies that are only needed for development
devShells = forAllSystems (system:
let
pkgs = nixpkgsFor.${system};
in
{
default = pkgs.mkShell {
buildInputs = with pkgs; [
go_1_21 # golang 1.21
gopls # go language server
gotools # go imports
go-tools # static checks
gnumake # standard make

etcd
# mongodb-5_0
cfssl
istioctl
gettext
jq
fluxcd
kubernetes-helm
kustomize
krew
sops
minikube
kind
kubelogin-oidc
kubectx
tilt
kubebuilder
skaffold
delve
ctlptl
cue
];
};
});

};
}

0 comments on commit c3f7b9d

Please sign in to comment.