-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
75 lines (70 loc) · 1.88 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
65
66
67
68
69
70
71
72
73
74
75
{
description = "Flake for GH-pages";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
# code
code.url = "./code";
code.inputs.nixpkgs.follows = "nixpkgs";
# report
report.url = "./report";
report.inputs.nixpkgs.follows = "nixpkgs";
# slides
slides.url = "./slides";
slides.inputs.nixpkgs.follows = "nixpkgs";
website-builder.url = "github:rasmus-kirk/website-builder";
website-builder.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = {
nixpkgs,
website-builder,
report,
slides,
...
}: let
supportedSystems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
forAllSystems = f:
nixpkgs.lib.genAttrs supportedSystems (system:
f {
pkgs = import nixpkgs {inherit system;};
});
in {
packages = forAllSystems ({pkgs}: let
website = website-builder.lib {
pkgs = pkgs;
src = ./.;
headerTitle = "Halo Accumulation Scheme";
includedDirs = [
report.outputs.packages."${pkgs.system}".default
slides.outputs.packages."${pkgs.system}".default
];
standalonePages = [{
title = "Investigating IVC with Accumulation Schemes";
inputFile = ./README.md;
outputFile = "index.html";
}];
navbar = [
{
title = "Home";
location = "/";
}
{
title = "Report";
location = "/report/report.pdf";
}
{
title = "Slides";
location = "/slides/slides.pdf";
}
{
title = "Github";
location = "https://github.com/rasmus-kirk/halo-accumulation";
}
];
};
in {
default = website.package;
debug = website.loop;
});
formatter = forAllSystems ({pkgs}: pkgs.alejandra);
};
}