-
Notifications
You must be signed in to change notification settings - Fork 200
/
flake.nix
59 lines (48 loc) · 2.45 KB
/
flake.nix
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
{
description = "IHP is a modern batteries-included haskell web framework, built on top of Haskell and Nix.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs?rev=54b4bb956f9891b872904abdb632cea85a033ff2";
# pre-defined set of default target systems
systems.url = "github:nix-systems/default";
# a module framework for flakes
flake-parts.url = "github:hercules-ci/flake-parts";
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
# used for setting up development environments
devenv.url = "github:cachix/devenv?rev=6e318854efa95c5e67a1152547f838754e8f0306";
devenv.inputs.nixpkgs.follows = "nixpkgs";
# TODO use a corresponding release branch
# import ihp-boilerplate for the templates
ihp-boilerplate.url = "github:digitallyinduced/ihp-boilerplate";
nix-filter.url = "github:numtide/nix-filter";
};
outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } (
{ flake-parts-lib, withSystem, ... } : {
systems = import inputs.systems;
imports = [
inputs.devenv.flakeModule
(flake-parts-lib.importApply ./devenv-module.nix { inherit inputs; })
];
flake = {
flakeModules.default = flake-parts-lib.importApply ./flake-module.nix { inherit inputs; };
templates.default = {
path = inputs.ihp-boilerplate;
description = "Template for an IHP project";
welcomeText = ''
TODO this is shown when running nix init, could contain instruction to get started
'';
};
nixosModules = {
app = ./NixSupport/nixosModules/app.nix;
appWithPostgres = ./NixSupport/nixosModules/appWithPostgres.nix;
services_app = ./NixSupport/nixosModules/services/app.nix;
services_worker = ./NixSupport/nixosModules/services/worker.nix;
services_migrate = ./NixSupport/nixosModules/services/migrate.nix;
services_loadSchema = ./NixSupport/nixosModules/services/loadSchema.nix;
options = ./NixSupport/nixosModules/options.nix;
binaryCache = ./NixSupport/nixosModules/binaryCache.nix;
};
nix-ci.impure = true;
};
}
);
}