-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathflake.nix
More file actions
52 lines (50 loc) · 1.28 KB
/
flake.nix
File metadata and controls
52 lines (50 loc) · 1.28 KB
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
46
47
48
49
50
51
52
{
description = "Core packages flake";
inputs = {
# For bootstrapping
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default";
treefmt-nix.url = "github:numtide/treefmt-nix";
};
outputs =
{
self,
systems,
nixpkgs,
treefmt-nix,
}:
let
forAllSystems = nixpkgs.lib.genAttrs (import systems);
mkTreefmt =
pkgs:
let
fmt = treefmt-nix.lib.evalModule pkgs {
projectRootFile = "flake.nix";
programs.nixfmt.enable = true;
programs.keep-sorted = {
enable = true;
includes = [
"*.nix"
"maintainers/scripts/sync-with-nixpkgs/script.py"
];
};
};
in
fmt.config.build.wrapper;
in
{
legacyPackages = forAllSystems (
system:
import ./. {
inherit system;
}
);
formatter = forAllSystems (system: mkTreefmt nixpkgs.legacyPackages.${system});
nixConfig = {
extra-substituters = [ "https://ekala-corepkgs.cachix.org" ];
extra-trusted-public-keys = [
"ekala-corepkgs.cachix.org-1:DcZV+vegWoEzacbSdXFXU4S7728C0eS9RfGpKeyHd6w="
];
};
};
}