Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
86 lines (77 loc) · 2.69 KB
/
Copy pathflake.nix
File metadata and controls
86 lines (77 loc) · 2.69 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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
topiary.url = "github:tweag/topiary";
camelotte = {
## NOTE: This is `github:lesboloss-es/camelotte`, but the `github:` scheme
## downloads the archive and therefore does not support the `submodules`
## attribute, which Camelotte uses.
url = "git+https://github.com/lesboloss-es/camelotte.git";
inputs = {
nixpkgs.follows = "nixpkgs";
topiary.follows = "topiary";
git-hooks.follows = "git-hooks-nix";
flake-parts.follows = "flake-parts";
};
};
git-hooks-nix = {
url = "github:cachix/git-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
sqlgg = {
## NOTE: using the fork until these PRs are merged:
## - https://github.com/ygrek/sqlgg/pull/291 - support for pgtrgm functions and operators
## - https://github.com/ygrek/sqlgg/pull/292 - fix pg params number in reusable queries
url = "github:niols/sqlgg";
flake = false;
};
};
outputs =
inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
./nix/application.nix
./nix/environment.nix
./nix/nixosmodule.nix
./nix/package.nix
./nix/tests.nix
./src/server/controller/renderer/flake-part.nix
];
systems = [
"x86_64-linux"
"aarch64-linux"
];
## Improve the way `inputs'` are computed by also handling the case of
## flakes having a `lib.${system}` attribute.
##
perInput = system: flake: if flake ? lib.${system} then { lib = flake.lib.${system}; } else { };
## Create our `pkgs` set by importing nixpkgs with some overlays. This is
## used to inject all of Camelotte, but also sometimes to modify packages
## that we depend on. This actually ensures that Camelotte packages will
## also pick up those modifications.
##
perSystem =
{ system, ... }:
{
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
overlays = [
inputs.camelotte.overlays.default
];
};
};
};
nixConfig = {
extra-trusted-substituters = [
"https://dancelor.cachix.org/"
"https://pre-commit-hooks.cachix.org/"
"https://tweag-topiary.cachix.org/"
];
extra-trusted-public-keys = [
"dancelor.cachix.org-1:Q2pAI0MA6jIccQQeT8JEsY+Wfwb/751zmoUHddZmDyY="
"pre-commit-hooks.cachix.org-1:Pkk3Panw5AW24TOv6kz3PvLhlH8puAsJTBbOPmBo7Rc="
"tweag-topiary.cachix.org-1:8TKqya43LAfj4qNHnljLpuBnxAY/YwEBfzo3kzXxNY0="
];
};
}