-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathflake.nix
More file actions
87 lines (73 loc) · 2.77 KB
/
flake.nix
File metadata and controls
87 lines (73 loc) · 2.77 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
{
description =
"
This flake represents the build configurations for the Polar project.
It outputs binaries and container images for each service,
as well as containerized development and test environments for ease of use.
See documentation for additional details.
";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
crane.url = "github:ipetkov/crane";
flake-utils.url = "github:numtide/flake-utils";
advisory-db = {
url = "github:rustsec/advisory-db";
flake = false;
};
myNeovimOverlay.url = "github:daveman1010221/nix-neovim";
myNeovimOverlay.inputs.nixpkgs.follows = "nixpkgs";
myNeovimOverlay.inputs.flake-utils.follows = "flake-utils";
staticanalysis.url = "github:daveman1010221/polar-static-analysis";
staticanalysis.inputs.nixpkgs.follows = "nixpkgs";
staticanalysis.inputs.flake-utils.follows = "flake-utils";
staticanalysis.inputs.rust-overlay.follows = "rust-overlay";
dotacat.url = "github:daveman1010221/dotacat-fast";
dotacat.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, crane, rust-overlay, flake-utils, advisory-db, myNeovimOverlay, staticanalysis, dotacat, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
# overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs {
inherit system;
config = {
cc = "clang";
};
documentation = {
dev.enable = true;
man = {
man-db.enable = true;
generateCaches = true;
};
};
overlays = [
rust-overlay.overlays.default
myNeovimOverlay.overlays.default
];
};
inherit (pkgs) lib;
containers = import ./src/flake/containers.nix {
inherit system pkgs rust-overlay staticanalysis dotacat myNeovimOverlay;
};
polarPkgs = import ./src/agents/workspace.nix {
inherit pkgs lib crane rust-overlay;
};
commitMsgHooksPkg = import ./src/git-hooks/package.nix {
inherit pkgs crane;
};
# get certificates for mtls
tlsCerts = pkgs.callPackage ./src/flake/gen-certs.nix { inherit pkgs; };
devShells = import ./src/flake/shell.nix {
inherit system pkgs rust-overlay;
};
in
{
packages = {
inherit polarPkgs containers tlsCerts commitMsgHooksPkg;
default = polarPkgs.workspacePackages;
};
devShells.default = containers.devShells.default;
});
}