2024-07-05 11:40:30 +00:00
|
|
|
{
|
|
|
|
description = "infra-shell";
|
|
|
|
|
2024-10-21 14:19:03 +00:00
|
|
|
# bitwarden-cli has a build issue on macOS since 2024.8.0:
|
|
|
|
# this commit fixes nixpkgs right before switching to 2024.8.0
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/339576
|
|
|
|
inputs.nixpkgs.url = "github:nixos/nixpkgs/c374d94f1536013ca8e92341b540eba4c22f9c62";
|
|
|
|
#inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
2024-07-05 11:40:30 +00:00
|
|
|
|
|
|
|
outputs = { self, nixpkgs }:
|
|
|
|
let
|
|
|
|
stableSystems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
|
|
|
|
forAllSystems = nixpkgs.lib.genAttrs stableSystems;
|
|
|
|
pkgsFor = nixpkgs.lib.genAttrs stableSystems (
|
|
|
|
system: import nixpkgs { inherit system; config.allowUnfree = true; }
|
|
|
|
);
|
|
|
|
in rec {
|
|
|
|
devShells = forAllSystems (system: let
|
|
|
|
pkgs = pkgsFor.${system};
|
|
|
|
in {
|
|
|
|
default = let
|
2024-10-21 14:19:03 +00:00
|
|
|
pythonPkgs = pkgs.python3.withPackages (
|
|
|
|
_: with (pkgs.python3Packages); [
|
2024-07-05 11:40:30 +00:00
|
|
|
ipython pyyaml jinja2 PyGithub
|
|
|
|
pyopenssl cryptography
|
2024-09-05 09:07:28 +00:00
|
|
|
hvac
|
2024-07-05 11:40:30 +00:00
|
|
|
]
|
|
|
|
);
|
|
|
|
in pkgs.mkShellNoCC {
|
|
|
|
packages = with pkgs.buildPackages; [
|
|
|
|
# misc
|
2024-09-05 09:07:28 +00:00
|
|
|
git openssh jq fzf silver-searcher direnv
|
2024-07-05 11:40:30 +00:00
|
|
|
# networking
|
|
|
|
curl nmap nettools dnsutils
|
|
|
|
# infra
|
|
|
|
terraform ansible_2_16 pythonPkgs
|
|
|
|
# security
|
2024-09-05 09:07:28 +00:00
|
|
|
pass vault bitwarden-cli yubikey-manager pwgen
|
2024-07-05 11:40:30 +00:00
|
|
|
# cloud
|
|
|
|
aliyun-cli awscli doctl google-cloud-sdk
|
|
|
|
hcloud s3cmd scaleway-cli
|
|
|
|
];
|
|
|
|
|
|
|
|
shellHook = ''
|
2024-10-21 14:19:03 +00:00
|
|
|
make checks
|
2024-07-05 11:40:30 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
|
|
|
}
|