simplify nix setup
This commit is contained in:
parent
57193c2990
commit
dc4c9b3be0
4 changed files with 21 additions and 114 deletions
20
default.nix
Normal file
20
default.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
system ? builtins.currentSystem,
|
||||
pkgs ? import (builtins.fetchTarball {
|
||||
url = "https://github.com/nixos/nixpkgs/archive/56c0d09b76608a7fa28127a37d81d9003e46acf6.tar.gz";
|
||||
}) { inherit system; },
|
||||
papermod ? pkgs.fetchFromGitHub {
|
||||
owner = "adityatelange";
|
||||
repo = "hugo-papermod";
|
||||
rev = "master";
|
||||
hash = "sha256-Dv/QnYYG5KTQro95kzwgQeOS0nO2HyfBoSou5AsCFAI=";
|
||||
},
|
||||
}:
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "website";
|
||||
src = ./.;
|
||||
postPatch = "mkdir themes && cp -r ${papermod} themes/papermod";
|
||||
nativeBuildInputs = [ pkgs.hugo ];
|
||||
buildPhase = "hugo";
|
||||
installPhase = "cp -r public $out";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue