-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
58 lines (54 loc) · 1.46 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
51
52
53
54
55
56
57
58
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
inputs.unstableNixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.systems.url = "github:nix-systems/default";
inputs.flake-utils = {
url = "github:numtide/flake-utils";
inputs.systems.follows = "systems";
};
outputs =
{
nixpkgs,
unstableNixpkgs,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs {
system = "${system}";
config.allowUnfree = true;
};
unstablePkgs = import unstableNixpkgs {
system = "${system}";
config.allowUnfree = true;
};
in
{
formatter = pkgs.nixfmt-rfc-style;
devShells.default = pkgs.mkShell {
name = "spectrum";
packages = [
pkgs.bashInteractive
pkgs.nixfmt-rfc-style
pkgs.just
pkgs.gh
unstablePkgs.talosctl
pkgs.kubectl
pkgs.kubernetes-helm
pkgs.kustomize
pkgs.kubevirt
pkgs.cilium-cli
pkgs.fluxcd
pkgs.terraform
];
shellHook = ''
[[ -f $FLUENCE_SECRETS ]] && source $FLUENCE_SECRETS
[[ -f ./kubeconfig ]] && export KUBECONFIG=$(realpath ./kubeconfig)
[[ -f ./talosconfig ]] && export TALOSCONFIG=$(realpath ./talosconfig)
'';
};
}
);
}