summaryrefslogtreecommitdiff
path: root/flake.nix
blob: 38e555e14b276d2f262137779412436470e1cb98 (plain)
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
{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11";
    devshell.url = "github:numtide/devshell";
    nixlib.url = "github:divnix/nixpkgs.lib";
    flake-compat = {
      url = "github:edolstra/flake-compat";
      flake = false;
    };
  };

  outputs = inputs@{ self, nixlib, nixpkgs, devshell, ... }:
    let

      # Unofficial Flakes Roadmap - Polyfills
      # This project is committed to the Unofficial Flakes Roadmap!
      # .. see: https://demo.hedgedoc.org/s/_W6Ve03GK#

      # Super Stupid Flakes (ssf) / System As an Input - Style:
      supportedSystems = [ "aarch64-linux" "x86_64-linux" ];

      polyfillOutput = loc: nixlib.lib.genAttrs supportedSystems (system:
        import loc { inherit system inputs; }
      );
    in
    {

      nixosModules = import ./modules { };
      nixosModule = self.nixosModules.matrix-appservices;

      overlays.matrix-appservices = final: prev: import ./pkgs { pkgs = prev; };
      overlay = self.overlays.matrix-appservices;

      packages = polyfillOutput ./packages.nix;

      checks = polyfillOutput ./checks.nix;
    };
}