aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
blob: 4a8daec36755c3180de94aecc65e233dada241d0 (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
39
40
41
42
43
44
45
{
  description = "vkcku's monorepo.";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";

    # keep-sorted start block=yes newline_separated=yes
    disko = {
      url = "github:nix-community/disko";
      inputs.nixpkgs.follows = "nixpkgs";
    };

    impermanence = {
      url = "github:nix-community/impermanence";
      inputs.nixpkgs.follows = "";
      inputs.home-manager.follows = "";
    };

    flake-parts.url = "github:hercules-ci/flake-parts";

    import-tree.url = "github:denful/import-tree";

    treefmt-nix = {
      url = "github:numtide/treefmt-nix";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    # keep-sorted end
  };

  outputs =
    {
      nixpkgs,
      flake-parts,
      import-tree,
      ...
    }@inputs:
    let
      lib = nixpkgs.lib;
      directories = builtins.attrNames (
        lib.attrsets.filterAttrs (_: type: type == "directory") (builtins.readDir ./.)
      );
      paths = map (lib.path.append ./.) directories;
    in
    flake-parts.lib.mkFlake { inherit inputs; } (import-tree paths);
}