Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 23 additions & 8 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

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

outputs = { self, nixpkgs }:
outputs =
{ self, nixpkgs }:
let
supportedSystems = [
"x86_64-linux"
Expand All @@ -12,13 +13,14 @@
"aarch64-darwin"
];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
in {
devShells = forAllSystems (system:
in
{
devShells = forAllSystems (
system:
let
pkgs = import nixpkgs {
inherit system;
config.allowUnfreePredicate = pkg:
builtins.elem (nixpkgs.lib.getName pkg) [ "terraform" ];
config.allowUnfreePredicate = pkg: builtins.elem (nixpkgs.lib.getName pkg) [ "terraform" ];
};
docsPython = pkgs.python3.withPackages (ps: [
ps.mkdocs
Expand All @@ -31,12 +33,14 @@
kns = pkgs.writeShellScriptBin "kns" ''
exec ${pkgs.kubectx}/bin/kubens "$@"
'';
in {
in
{
default = pkgs.mkShell {
packages = with pkgs; [
go
gnumake
git
lazygit

# Kubernetes dev/demo tools
kubectl
Expand All @@ -57,11 +61,22 @@
govulncheck

docsPython

yazi
yazi
];

shellHook = ''
alias lg='lazygit'
'';
};
}
);

formatter = forAllSystems (
system:
let
pkgs = import nixpkgs { inherit system; };
in
pkgs.nixfmt
);
};
}