mirror of
https://github.com/SebastianStork/blog.git
synced 2026-01-21 11:41:35 +01:00
Package the site with nix
This commit is contained in:
parent
bd9f0f3960
commit
7dbc1edaf1
2 changed files with 18 additions and 5 deletions
4
flake.lock
generated
4
flake.lock
generated
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"linkita": {
|
"kita": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1761155460,
|
"lastModified": 1761155460,
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"linkita": "linkita",
|
"kita": "kita",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"treefmt": "treefmt"
|
"treefmt": "treefmt"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
19
flake.nix
19
flake.nix
|
|
@ -7,7 +7,7 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
linkita = {
|
kita = {
|
||||||
url = "github:SebastianStork/kita";
|
url = "github:SebastianStork/kita";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
{
|
{
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
treefmt,
|
treefmt,
|
||||||
linkita,
|
kita,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
|
@ -25,12 +25,25 @@
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
packages.${system}.default = pkgs.stdenv.mkDerivation {
|
||||||
|
name = "zola-site";
|
||||||
|
src = ./.;
|
||||||
|
nativeBuildInputs = [ pkgs.zola ];
|
||||||
|
buildPhase = ''
|
||||||
|
cp -r $src/* .
|
||||||
|
mkdir --parents ./themes/kita
|
||||||
|
cp -r ${kita}/* ./themes/kita/
|
||||||
|
zola build --output-dir $out
|
||||||
|
'';
|
||||||
|
doCheck = false;
|
||||||
|
};
|
||||||
|
|
||||||
devShells.${system}.default = pkgs.mkShell {
|
devShells.${system}.default = pkgs.mkShell {
|
||||||
packages = [ pkgs.zola ];
|
packages = [ pkgs.zola ];
|
||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
mkdir -p themes
|
mkdir -p themes
|
||||||
ln -snf "${linkita}" themes/kita
|
ln -snf "${kita}" themes/kita
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue