File tree 4 files changed +216
-250
lines changed
4 files changed +216
-250
lines changed Original file line number Diff line number Diff line change 1
- .PHONY : all install local
2
- SHELL := bash
1
+ .PHONY : build check serve install-mkdocs
3
2
4
- all : install local
5
-
6
- install :
3
+ install-mkdocs :
7
4
poetry install
8
5
9
- local :
10
- poetry run mkdocs serve --dev-addr localhost:8001
6
+ build :
7
+ poetry run mkdocs build --strict
8
+
9
+ chect : build
10
+
11
+ serve :
12
+ poetry run mkdocs serve --clean --strict --watch docs/
Original file line number Diff line number Diff line change 1
1
{
2
2
description = "dev env for handbook" ;
3
3
4
- # Flake inputs
5
- inputs = {
6
- nixpkgs . url = "github:NixOS/nixpkgs" ; # also valid: "nixpkgs"
7
- } ;
4
+ inputs . nixpkgs . url = "github:NixOS/nixpkgs" ;
5
+ inputs . flake-utils . url = "github:numtide/flake-utils" ;
8
6
9
- # Flake outputs
10
- outputs = { self , nixpkgs } :
11
- let
7
+ outputs =
8
+ inputs :
9
+ inputs . flake-utils . lib . eachSystem
12
10
# Systems supported
13
- allSystems = [
14
- "x86_64-linux" # 64-bit Intel/AMD Linux
15
- "aarch64-linux" # 64-bit ARM Linux
16
- "x86_64-darwin" # 64-bit Intel macOS
17
- "aarch64-darwin" # 64-bit ARM macOS
18
- ] ;
19
-
20
- # Helper to provide system-specific attributes
21
- forAllSystems = f : nixpkgs . lib . genAttrs allSystems ( system : f {
22
- pkgs = import nixpkgs { inherit system ; } ;
23
- } ) ;
24
- in
25
- {
26
- # Development environment output
27
- devShells = forAllSystems ( { pkgs } : {
28
- default =
29
- pkgs . mkShell {
11
+ [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]
12
+ (
13
+ system :
14
+ let
15
+ pkgs = import inputs . nixpkgs { localSystem = { inherit system ; } ; } ;
16
+ in
17
+ {
18
+ devShells . default = pkgs . mkShell {
30
19
packages = with pkgs ; [
20
+ # Development environment output
31
21
python311
32
22
poetry
33
23
] ;
34
24
} ;
35
- } ) ;
36
- } ;
25
+ }
26
+ ) ;
37
27
}
You can’t perform that action at this time.
0 commit comments