]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - flakes/mypackages/flake.nix
Squash changes containing private information
[perso/Immae/Config/Nix.git] / flakes / mypackages / flake.nix
diff --git a/flakes/mypackages/flake.nix b/flakes/mypackages/flake.nix
new file mode 100644 (file)
index 0000000..adad96f
--- /dev/null
@@ -0,0 +1,43 @@
+{
+  description = "immae-eu infrastructure";
+  inputs = {
+    flake-parts.url = "github:hercules-ci/flake-parts";
+    # TODO: use nixos-unstable branch at some point and use the lock to keep the actual commit
+    nixpkgs.url = "github:nixos/nixpkgs/062a0c5437b68f950b081bbfc8a699d57a4ee026";
+    webapps-ttrss = {
+      url = "https://git.tt-rss.org/fox/tt-rss.git";
+      ref = "master";
+      rev = "986ca251f995f7754a0470d3e0c44538a545081f";
+      type = "git";
+      flake = false;
+    };
+  };
+  outputs = inputs@{ self, flake-parts, ... }:
+    flake-parts.lib.mkFlake { inherit inputs; } {
+      imports = [
+        (import ./lib/flake-parts-lib.nix { name = "lib"; type = "unspecified"; })
+      ];
+      systems = [ "x86_64-linux" ];
+      perSystem = { config, inputs', pkgs, ... }:
+        let
+          mypkgs = import ./pkgs/default.nix { inherit pkgs; inherit (self) mylibs sources; };
+        in {
+          packages = builtins.removeAttrs mypkgs [ "composerEnv" "webapps-apache-theme" ];
+          lib = {
+            inherit (self) sources;
+            inherit (mypkgs) composerEnv;
+            inherit (self.mylibs) postfixScript;
+            apache-theme = mypkgs.webapps-apache-theme;
+          };
+        };
+      flake = {
+        mylibs = import ./lib/default.nix;
+        sources.tools.ttrss = inputs.webapps-ttrss;
+        # We want overlays to be infected (in contrary to "packages"
+        # above): if someone imports an overlay here, we want his own
+        # overlays to be taken into account in every package, even new
+        # ones.
+        overlays = import ./overlays/default.nix { inherit (self) sources mylibs; };
+      };
+    };
+}