-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
64 lines (61 loc) · 2.21 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
64
{
nixConfig = {
extra-substituters = "https://cache.garnix.io";
extra-trusted-public-keys = "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=";
};
inputs = {
emanote.url = "github:srid/emanote";
nixpkgs.follows = "emanote/nixpkgs";
flake-parts.follows = "emanote/flake-parts";
hercules-ci-effects.url = "github:hercules-ci/hercules-ci-effects";
# Individual flake-parts modules go here
haskell-flake.url = "github:srid/haskell-flake";
haskell-flake.flake = false;
services-flake.url = "github:juspay/services-flake";
services-flake.flake = false;
process-compose-flake.url = "github:Platonic-Systems/process-compose-flake";
process-compose-flake.flake = false;
mission-control.url = "github:Platonic-Systems/mission-control";
mission-control.flake = false;
};
outputs = inputs@{ self, flake-parts, nixpkgs, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = nixpkgs.lib.systems.flakeExposed;
imports = [
inputs.hercules-ci-effects.flakeModule
(import ./nix/flake-module.nix { inherit inputs; })
];
hercules-ci.flake-update = {
enable = true;
autoMergeMethod = "merge";
baseMerge.enable = true;
createPullRequest = true;
when = {
hour = [ 8 20 ];
};
};
herculesCI.ciSystems = [ "x86_64-linux" ];
flake.flakeModules.default = import ./nix/flake-module.nix { inherit inputs; };
perSystem = { config, self', pkgs, lib, system, ... }: {
flake-parts-docs.enable = true;
apps.preview.program = pkgs.writeShellApplication {
name = "emanote-static-preview";
meta.description = ''
Run a locally running preview of the statically generated docs.
'';
runtimeInputs = [ pkgs.static-web-server ];
text = ''
set -x
static-web-server -d ${self'.packages.default} -p ${builtins.toString (1 + config.emanote.sites.default.port)} "$@"
'';
};
devShells.default = pkgs.mkShell {
buildInputs = [
pkgs.nixpkgs-fmt
pkgs.just
];
};
formatter = pkgs.nixpkgs-fmt;
};
};
}