]>
Commit | Line | Data |
---|---|---|
776aa360 IB |
1 | { |
2 | description = "immae-eu infrastructure"; | |
3 | inputs = { | |
4 | flake-parts.url = "github:hercules-ci/flake-parts"; | |
5 | # TODO: use nixos-unstable branch at some point and use the lock to keep the actual commit | |
6 | nixpkgs.url = "github:nixos/nixpkgs/062a0c5437b68f950b081bbfc8a699d57a4ee026"; | |
7 | }; | |
8 | outputs = inputs@{ self, flake-parts, ... }: | |
9 | flake-parts.lib.mkFlake { inherit inputs; } { | |
10 | imports = [ | |
11 | (import ./lib/flake-parts-lib.nix { name = "lib"; type = "unspecified"; }) | |
12 | (import ./lib/flake-parts-lib.nix { name = "environments"; type = "package"; }) | |
13 | ]; | |
14 | systems = [ "x86_64-linux" ]; | |
15 | perSystem = { config, inputs', pkgs, ... }: | |
16 | let | |
17 | mypkgs = import ./pkgs/default.nix { forFlakes = true; inherit pkgs; inherit (self) mylibs sources environments; }; | |
18 | in { | |
19 | packages = | |
20 | builtins.removeAttrs mypkgs [ "myEnvironments" "composerEnv" "webapps" "status_engine" "python3PackagesPlus" ] // | |
21 | (pkgs.lib.mapAttrs' (n: pkgs.lib.nameValuePair ("status-engine-" + n)) mypkgs.status_engine) // | |
22 | (pkgs.lib.mapAttrs' (n: pkgs.lib.nameValuePair ("webapps-" + n)) (builtins.removeAttrs mypkgs.webapps [ "apache-theme" ])); | |
23 | environments = import ./environments/default.nix { inherit (pkgs) callPackage; }; | |
24 | lib = { | |
25 | inherit (mypkgs) composerEnv sources; | |
26 | inherit (mypkgs.webapps) apache-theme; | |
27 | }; | |
28 | }; | |
29 | flake = { | |
30 | mylibs = import ./lib/default.nix; | |
31 | sources = import ./sources/sources.nix; | |
32 | overlays = import ./overlays/default.nix { forFlakes = true; inherit (self) sources mylibs; } // { | |
33 | mypkgs = final: prev: self.packages."${final.system}"; | |
34 | }; | |
35 | }; | |
36 | }; | |
37 | } |