-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
81 lines (81 loc) · 2.25 KB
/
flake.nix
File metadata and controls
81 lines (81 loc) · 2.25 KB
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
76
77
78
79
80
81
{
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
treefmt-nix.url = "github:numtide/treefmt-nix";
gitignore.url = "github:hercules-ci/gitignore.nix";
};
outputs = {...} @ inputs:
inputs.flake-utils.lib.eachDefaultSystem (
system: let
pkgs = (import inputs.nixpkgs) {
inherit system;
config = {
allowUnfree = true;
allowBroken = true;
};
};
pythonPkg = pythonPackages:
with pythonPackages; [
ipykernel
pandas
pip
numpy
scipy
sympy
matplotlib
pyyaml
nbformat
nbclient
jupyter
];
in {
devShells = rec {
quartoShell = let
in
pkgs.mkShell {
packages = with pkgs; [
(python3.withPackages pythonPkg)
quarto
texliveFull
texworks
texstudio
typst
librsvg
chromium
];
shellHook = ''
export QUARTO_CHROMIUM_HEADLESS_MODE=new
'';
};
default = quartoShell;
};
formatter = let
treefmtconfig = inputs.treefmt-nix.lib.evalModule pkgs {
projectRootFile = "flake.nix";
programs = {
alejandra.enable = true;
black.enable = true;
toml-sort.enable = true;
yamlfmt.enable = true;
mdformat.enable = true;
prettier.enable = true;
shellcheck.enable = true;
shfmt.enable = true;
};
settings.formatter.shellcheck.excludes = [".envrc"];
};
in
treefmtconfig.config.build.wrapper;
apps = rec {
};
packages = rec {
presentations = pkgs.callPackage ./nix/build.nix {inherit pythonPkg;};
zipped = pkgs.callPackage ./nix/zipped.nix { src = presentations; };
release = zipped;
pages = presentations;
default = presentations;
};
}
);
}