-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
57 lines (49 loc) · 1.85 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
{
inputs = {
# Here you can adjust the IHP version of your project
# You can find new releases at https://github.com/digitallyinduced/ihp/releases
ihp.url = "github:digitallyinduced/ihp/v1.1";
nixpkgs.follows = "ihp/nixpkgs";
flake-parts.follows = "ihp/flake-parts";
devenv.follows = "ihp/devenv";
systems.follows = "ihp/systems";
};
outputs = inputs@{ ihp, flake-parts, systems, nixpkgs, self, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = import systems;
imports = [ ihp.flakeModules.default ];
perSystem = { pkgs, ... }: {
ihp = {
enable = true;
projectPath = ./.;
packages = with pkgs; [
# Native dependencies, e.g. imagemagick
nodejs
];
haskellPackages = p: with p; [
# Haskell dependencies go here
p.ihp
cabal-install
base
wai
text
hlint
mmark
# <---- Custom packages start here
# http-streams
];
};
};
flake.nixosConfigurations."test-server-one" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = inputs // {
environment = "production";
ihp-migrate = self.packages.x86_64-linux.migrate;
ihpApp = self.packages.x86_64-linux.default;
};
modules = [
./nixos/configuration.nix
];
};
};
}