Files
sebastians-website/flake.nix

30 lines
894 B
Nix

{
description = "sebastians website";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
gokarna = {
url = "github:526avijitgupta/gokarna";
flake = false;
};
};
outputs = { self, nixpkgs, flake-utils, gokarna }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system};
in {
packages.sebastians-website = pkgs.stdenv.mkDerivation {
name = "sebastians-website";
src = self;
buildPhase = ''
mkdir -p themes
ln -s ${gokarna} themes/gokarna
${pkgs.hugo}/bin/hugo -s . -d $out
'';
};
defaultPackage = self.packages.${system}.sebastians-website;
devShells.default = pkgs.mkShell { packages = [ pkgs.hugo ]; shellHook = "mkdir -p themes; ln -sf ${gokarna} themes/gokarna"; };
});
}