aboutsummaryrefslogtreecommitdiff
path: root/flakes/private/paste/flake.nix
blob: 23f8cd378ada66cbd08bbdc83d6f278d9857b116 (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
{
  inputs.paste = {
    path = "../../paste";
    type = "path";
  };
  inputs.my-lib = {
    path = "../../lib";
    type = "path";
  };
  inputs.nix-lib.url = "github:NixOS/nixpkgs";

  description = "Private configuration for paste";
  outputs = { self, my-lib, nix-lib, paste }:
    let
      cfg = name': { config, lib, pkgs, name, ... }: {
        imports = [
          (my-lib.lib.withNarKey paste "nixosModule")
        ];
        config = lib.mkIf (name == name') {
          services.paste = {
            enable = true;
            webDirectory = "/paste";
          };
        };
      };
    in
      paste.outputs //
      { nixosModules = paste.nixosModules or {} // nix-lib.lib.genAttrs ["eldiron"] cfg; };
}