forked from digitallyinduced/ihp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
56 lines (46 loc) · 2.28 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
{
description = "IHP is a modern batteries-included haskell web framework, built on top of Haskell and Nix.";
inputs = {
# TODO use nixpkgs-unstable and just .lock a version?
nixpkgs.url = "github:NixOS/nixpkgs?rev=ea0284a3da391822909be5e98a60c1e62572a7dc";
# 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";
# used for setting up development environments
devenv.url = "github:cachix/devenv";
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;
options = ./NixSupport/nixosModules/options.nix;
binaryCache = ./NixSupport/nixosModules/binaryCache.nix;
};
};
}
);
}