1
0
Fork 0
mirror of https://github.com/zhaofengli/attic.git synced 2024-12-15 17:50:57 +00:00
attic/flake.nix

57 lines
1.2 KiB
Nix
Raw Normal View History

2023-01-01 00:01:07 +00:00
{
description = "A Nix binary cache server";
inputs = {
2023-03-05 18:05:11 +00:00
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
2024-08-30 16:32:10 +00:00
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.05";
2023-01-01 00:01:07 +00:00
2024-08-30 16:32:10 +00:00
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
crane = {
2023-03-05 18:05:11 +00:00
url = "github:ipetkov/crane";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-github-actions = {
url = "github:nix-community/nix-github-actions";
inputs.nixpkgs.follows = "nixpkgs";
};
2023-01-01 00:01:07 +00:00
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
};
2024-08-30 16:32:10 +00:00
outputs = inputs @ { self, flake-parts, ... }: let
2024-09-08 16:44:22 +00:00
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
"riscv64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
2024-08-30 16:32:10 +00:00
inherit (inputs.nixpkgs) lib;
2023-01-06 07:59:35 +00:00
2024-08-30 16:32:10 +00: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 07:59:35 +00:00
};
2023-01-01 00:01:07 +00:00
}