diff options
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..e3ed4c9 --- /dev/null +++ b/flake.nix | |||
@@ -0,0 +1,47 @@ | |||
1 | { | ||
2 | description = "immae-eu infrastructure"; | ||
3 | inputs = { | ||
4 | flake-parts.url = "github:hercules-ci/flake-parts"; | ||
5 | devshell.url = "github:numtide/devshell"; | ||
6 | # nixpkgs for local tools | ||
7 | nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; | ||
8 | |||
9 | flakes.url = "path:./flakes"; | ||
10 | }; | ||
11 | outputs = inputs@{ self, flake-parts, flakes, ... }: | ||
12 | let | ||
13 | inherit (flakes.subflakes) public private; | ||
14 | inherit (public) mypackages; | ||
15 | in | ||
16 | flake-parts.lib.mkFlake { inherit inputs; } ({ withSystem, ... }: { | ||
17 | imports = [ | ||
18 | inputs.devshell.flakeModule | ||
19 | (mypackages.mylibs.flakePartsAddPerSystem { name = "lib"; type = "unspecified"; }) | ||
20 | ]; | ||
21 | systems = [ "x86_64-linux" ]; | ||
22 | perSystem = { config, inputs', pkgs, system, ... }: | ||
23 | { | ||
24 | packages = mypackages.packages."${system}"; | ||
25 | lib = mypackages.lib."${system}"; | ||
26 | devshells.default = { | ||
27 | packages = [ | ||
28 | pkgs.colmena | ||
29 | pkgs.nixUnstable pkgs.python3 pkgs.sops | ||
30 | pkgs.curl pkgs.shellcheck pkgs.jq | ||
31 | pkgs.gnumake pkgs.yq | ||
32 | ]; | ||
33 | env = [ | ||
34 | { name = "NIX_BUILD_TOP"; value = ""; } | ||
35 | { name = "PATH"; prefix = "scripts"; } | ||
36 | { name = "NIX_PATH"; value = "nixpkgs=${pkgs.path}"; } | ||
37 | ]; | ||
38 | }; | ||
39 | }; | ||
40 | flake = { | ||
41 | # FIXME: next line Can be removed in nix 2.16.* | ||
42 | devShell.x86_64-linux = self.devShells.x86_64-linux.default; | ||
43 | inherit (mypackages) mylibs sources overlays; | ||
44 | inherit (flakes) subflakes; | ||
45 | }; | ||
46 | }); | ||
47 | } | ||