aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2024-07-04 11:36:33 -0700
committerFranck Cuny <franck@fcuny.net>2024-07-04 11:36:33 -0700
commitfccd15aec3507fd3f0cb4a2c18a0ec1af1d69c1f (patch)
treef506115024e7e6247279409fa053e59927ec398c /flake.nix
parentdont format html files with prettier (diff)
downloadfcuny.net-fccd15aec3507fd3f0cb4a2c18a0ec1af1d69c1f.tar.gz
migrate to zola
Diffstat (limited to '')
-rw-r--r--flake.nix20
1 files changed, 8 insertions, 12 deletions
diff --git a/flake.nix b/flake.nix
index 50c856f..8db99b7 100644
--- a/flake.nix
+++ b/flake.nix
@@ -23,17 +23,17 @@
pname = "fcuny.net";
version = self.lastModifiedDate;
src = ./.;
- buildInputs = [ hugo git ];
+ buildInputs = [ zola git ];
buildPhase = ''
mkdir -p $out
- ${pkgs.hugo}/bin/hugo --minify --destination $out
+ ${pkgs.zola}/bin/zola -o $out
'';
dontInstall = true;
};
- hugo = pkgs.writeShellScriptBin "hugo" ''
+ zola = pkgs.writeShellScriptBin "zola" ''
set -euo pipefail
- export PATH=${pkgs.lib.makeBinPath [ pkgs.hugo pkgs.git ]}
- hugo server -D
+ export PATH=${pkgs.lib.makeBinPath [ pkgs.zola pkgs.git ]}
+ zola serve
'';
};
@@ -41,11 +41,7 @@
pre-commit-check = pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
- hugo = {
- enable = true;
- entry = "${pkgs.hugo}/bin/hugo";
- pass_filenames = false;
- };
+ nixpkgs-fmt.enable = true;
};
};
formatting = treefmtEval.config.build.check self;
@@ -54,13 +50,13 @@
apps = {
default = {
type = "app";
- program = "${self.packages."${system}".hugo}/bin/hugo";
+ program = "${self.packages."${system}".zola}/bin/zola";
};
};
devShells.default = pkgs.mkShell {
inherit (self.checks.${system}.pre-commit-check) shellHook;
- buildInputs = with pkgs; [ hugo git treefmt ];
+ buildInputs = with pkgs; [ zola git treefmt ];
};
});
}