-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
37 lines (36 loc) · 1.06 KB
/
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
36
37
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
apollo-zola = { url = "github:robbins/apollo-custom"; flake = false; };
#apollo-zola = { url = "git+file:///home/nate/src/github.com/robbins/apollo-custom"; flake = false; };
};
outputs = { self, nixpkgs, apollo-zola}:
let
themeName = "apollo";
pkgs = import nixpkgs { system = "x86_64-linux"; };
in
{
packages.x86_64-linux.default = with pkgs; stdenv.mkDerivation {
name = "robbins-cc-zola";
src = ./.;
buildInputs = with pkgs; [ zola ];
configurePhase = ''
mkdir -p "themes/${themeName}"
cp -r ${apollo-zola}/* "themes/${themeName}"
'';
buildPhase = ''
zola build
'';
installPhase = ''
cp -r public $out
'';
};
devShells."x86_64-linux".default = pkgs.mkShell {
packages = [ pkgs.zola ];
shellHook = ''
mkdir -p themes
ln -snf "${apollo-zola}" "themes/${themeName}"
'';
};
};
}