create src directory with all jekyll source code
create nix derivation to generate jekyll static content
|
@ -1 +0,0 @@
|
||||||
`jekyll serve`
|
|
51
flake.nix
|
@ -16,9 +16,52 @@
|
||||||
forEachSystem = nixpkgs.lib.genAttrs (import systems);
|
forEachSystem = nixpkgs.lib.genAttrs (import systems);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
packages = forEachSystem (system: {
|
packages = forEachSystem (system:
|
||||||
devenv-up = self.devShells.${system}.default.config.procfileScript;
|
let
|
||||||
});
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
images.hello = pkgs.dockerTools.buildImage {
|
||||||
|
name = "hello-docker";
|
||||||
|
config = {
|
||||||
|
Cmd = [ "${pkgs.hello}/bin/hello" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
website = pkgs.stdenv.mkDerivation
|
||||||
|
(
|
||||||
|
let
|
||||||
|
# TODO: DRY
|
||||||
|
gems = pkgs.bundlerEnv {
|
||||||
|
name = "static";
|
||||||
|
gemdir = ./src;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
version = "0.0.1";
|
||||||
|
name = "website";
|
||||||
|
|
||||||
|
src = ./src;
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
gems
|
||||||
|
gems.wrappedRuby
|
||||||
|
];
|
||||||
|
|
||||||
|
sourceRoot = "src";
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
bundle exec jekyll build
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out
|
||||||
|
cp -r _site/* $out/
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
devShells = forEachSystem
|
devShells = forEachSystem
|
||||||
(system:
|
(system:
|
||||||
|
@ -26,7 +69,7 @@
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
gems = pkgs.bundlerEnv {
|
gems = pkgs.bundlerEnv {
|
||||||
name = "static";
|
name = "static";
|
||||||
gemdir = ./.;
|
gemdir = ./src;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
1
result
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
/nix/store/7nwlgm56gharaymrwn8k4b2pld89098g-website
|
|
@ -64,6 +64,7 @@ exclude:
|
||||||
- lighthouse.png
|
- lighthouse.png
|
||||||
- klise-*.gem
|
- klise-*.gem
|
||||||
- klise.gemspec
|
- klise.gemspec
|
||||||
|
- gemset.nix
|
||||||
|
|
||||||
plugins:
|
plugins:
|
||||||
- jekyll-feed
|
- jekyll-feed
|
Before Width: | Height: | Size: 202 KiB After Width: | Height: | Size: 202 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 490 KiB After Width: | Height: | Size: 490 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 75 KiB |
Before Width: | Height: | Size: 217 KiB After Width: | Height: | Size: 217 KiB |
Before Width: | Height: | Size: 415 KiB After Width: | Height: | Size: 415 KiB |
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 67 KiB |
Before Width: | Height: | Size: 940 B After Width: | Height: | Size: 940 B |
Before Width: | Height: | Size: 3 KiB After Width: | Height: | Size: 3 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 63 KiB |