1
0
Fork 0
mirror of https://github.com/zhaofengli/attic.git synced 2025-03-05 08:17:05 +00:00
attic/flake.nix

47 lines
1.1 KiB
Nix
Raw Normal View History

2022-12-31 17:01:07 -07:00
{
description = "A Nix binary cache server";
inputs = {
2023-03-05 11:05:11 -07:00
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
2024-08-30 12:32:10 -04:00
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.05";
flake-utils.url = "github:numtide/flake-utils";
2022-12-31 17:01:07 -07:00
2024-08-30 12:32:10 -04:00
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
crane = {
2023-03-05 11:05:11 -07:00
url = "github:ipetkov/crane";
inputs.nixpkgs.follows = "nixpkgs";
};
2022-12-31 17:01:07 -07:00
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
};
2024-08-30 12:32:10 -04:00
outputs = inputs @ { self, flake-parts, ... }: let
supportedSystems = inputs.flake-utils.lib.defaultSystems ++ [ "riscv64-linux" ];
inherit (inputs.nixpkgs) lib;
2023-01-06 00:59:35 -07:00
2024-08-30 12:32:10 -04:00
modules = builtins.foldl' (acc: f: f acc) ./flake [
builtins.readDir
(lib.filterAttrs (name: type:
type == "regular" && lib.hasSuffix ".nix" name
))
(lib.mapAttrsToList (name: _:
lib.path.append ./flake name
))
];
in flake-parts.lib.mkFlake { inherit inputs; } {
imports = modules;
systems = supportedSystems;
debug = true;
2023-01-06 00:59:35 -07:00
};
2022-12-31 17:01:07 -07:00
}