aboutsummaryrefslogtreecommitdiff
path: root/flakes/backports/flake.nix
blob: 796664a2e6c28dfb27f7cdff5a0d13a89a9a2189 (plain) (blame)
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
{
  description = "Backported packages";

  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
  inputs.flake-utils.url = "github:numtide/flake-utils";

  outputs = { self, flake-utils, nixpkgs }: flake-utils.lib.eachDefaultSystem (system:
    let
      pkgs = import nixpkgs { inherit system; overlays = []; config = {}; };
    in rec {
      packages = {
        ntfy-sh = pkgs.ntfy-sh;
      };
      legacyPackages = packages;
      apps = {
        ntfy-sh = flake-utils.lib.mkApp { drv = packages.ntfy-sh; name = "ntfy-sh"; };
      };
    }
  ) // rec {
    lib = {
      overrideDeps = pkgs: package: let
          packageDeps = builtins.attrNames package.override.__functionArgs;
        in package.override (pkgs.lib.genAttrs packageDeps (n: pkgs."${n}"));
    };
    overlays = {
      ntfy-sh = final: prev: { ntfy-sh = self.packages."${final.system}".ntfy-sh; };
    };
    overlay = final: prev: ({}
      // overlays.ntfy-sh final prev
    );

    nixosModules = {
      #coturn = import (nixpkgs + "/nixos/modules/services/networking/coturn.nix");
    };
  };
}