Advent-of-Nix-2024/flake.nix
2024-12-01 15:50:11 +01:00

17 lines
574 B
Nix

{
description = "Advent of Code 2024, but Nix";
inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small"; };
outputs = { self, nixpkgs }:
let
inherit (nixpkgs) lib;
utils = import ./utils.nix { inherit lib nixpkgs; };
in {
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt;
} // (builtins.mapAttrs
(n: v: import "${./.}/${n}" { inherit lib nixpkgs utils; })
(lib.filterAttrs (n: v:
v == "directory" && (builtins.match "(day[[:digit:]]+)" n) != null)
(builtins.readDir ./.)));
}