-
Notifications
You must be signed in to change notification settings - Fork 2
/
flake.nix
63 lines (56 loc) · 2.33 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
60
61
62
63
{
inputs = {
ihp.url = "github:digitallyinduced/ihp";
nixpkgs.follows = "ihp/nixpkgs";
flake-parts.follows = "ihp/flake-parts";
devenv.follows = "ihp/devenv";
systems.follows = "ihp/systems";
};
outputs = inputs@{ ihp, flake-parts, systems, ... }:
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
imagemagick
nodejs
(nodePackages.tailwindcss.overrideAttrs
(_: {
plugins = [
nodePackages."@tailwindcss/aspect-ratio"
nodePackages."@tailwindcss/forms"
nodePackages."@tailwindcss/language-server"
nodePackages."@tailwindcss/line-clamp"
nodePackages."@tailwindcss/typography"
];
})
)
];
haskellPackages = p: with p; [
# Haskell dependencies go here
p.ihp
cabal-install
base
wai
text
hlint
jwt
mmark
hspec
];
};
devenv.shells.default = {
# Custom processes that don't appear in https://devenv.sh/reference/options/
processes = {
tailwind.exec = "tailwindcss -c tailwind/tailwind.config.js -i ./tailwind/app.css -o static/app.css --watch=always";
};
# This is needed so when running tests in GitHub actions, we can execute `devenv up &` without an error.
process.implementation = "overmind";
};
};
};
}