-
Notifications
You must be signed in to change notification settings - Fork 3
/
flake.nix
35 lines (31 loc) · 815 Bytes
/
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
{
description = "Unterrichtsnotizen für einwöchigen Linux-Kurs";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11";
};
outputs = { self, nixpkgs, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {inherit system;};
inherit (pkgs) lib;
in {
legacyPackages.${system} = { inherit pkgs; };
devShells.${system}.ci = pkgs.mkShell {
nativeBuildInputs = with pkgs; [ mdbook mdbook-mermaid ];
shellHook = ''
mdbook-mermaid install
mdbook build
touch docs/.nojekyll
exit
'';
};
devShell.${system} = pkgs.mkShell {
nativeBuildInputs = with pkgs; [ mdbook mdbook-mermaid ];
shellHook = ''
mdbook-mermaid install
mdbook serve --port 3333 --open
exit
'';
};
};
}