-
Notifications
You must be signed in to change notification settings - Fork 5
/
flake.nix
50 lines (47 loc) · 1.58 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{
description = "infra-shell";
# 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";
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
pythonPkgs = pkgs.python3.withPackages (
_: with (pkgs.python3Packages); [
ipython pyyaml jinja2 PyGithub
pyopenssl cryptography
hvac
]
);
in pkgs.mkShellNoCC {
packages = with pkgs.buildPackages; [
# misc
git openssh jq fzf silver-searcher direnv
# networking
curl nmap nettools dnsutils
# infra
terraform ansible_2_16 pythonPkgs
# security
pass vault bitwarden-cli yubikey-manager pwgen
# cloud
aliyun-cli awscli doctl google-cloud-sdk
hcloud s3cmd scaleway-cli
];
shellHook = ''
make checks
'';
};
});
};
}