File tree Expand file tree Collapse file tree 4 files changed +71
-0
lines changed Expand file tree Collapse file tree 4 files changed +71
-0
lines changed Original file line number Diff line number Diff line change 1+ use flake
Original file line number Diff line number Diff line change 22.hugo_build.lock
33/resources /**
44* .cast
5+ .direnv
Original file line number Diff line number Diff line change 1+ {
2+ description = "Hugo Blog Flake" ;
3+
4+ # Flake inputs
5+ inputs . nixpkgs . url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz" ;
6+
7+ # Flake outputs
8+ outputs = { self , nixpkgs } :
9+ let
10+ # The systems supported for this flake
11+ supportedSystems = [
12+ "x86_64-linux" # 64-bit Intel/AMD Linux
13+ "aarch64-linux" # 64-bit ARM Linux
14+ "x86_64-darwin" # 64-bit Intel macOS
15+ "aarch64-darwin" # 64-bit ARM macOS
16+ ] ;
17+
18+ # Helper to provide system-specific attributes
19+ forEachSupportedSystem = f : nixpkgs . lib . genAttrs supportedSystems ( system : f {
20+ pkgs = import nixpkgs { inherit system ; } ;
21+ } ) ;
22+ in
23+ {
24+ devShells = forEachSupportedSystem ( { pkgs } : {
25+ default = pkgs . mkShell {
26+ packages = with pkgs ; [
27+ hugo
28+ gnumake
29+ ] ;
30+
31+ env = { } ;
32+
33+ shellHook = ''
34+ echo
35+ printf '\033[32mCreate new site:\033[0m\n'
36+ echo hugo new posts/sed.md
37+ echo
38+ printf '\033[32mServe blog locally:\033[0m\n'
39+ echo make serve
40+ '' ;
41+ } ;
42+ } ) ;
43+ } ;
44+ }
You can’t perform that action at this time.
0 commit comments