Files
sebastians-website/flake.nix
2023-12-20 17:11:28 +01:00

30 lines
807 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.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}.website;
devShells.default = pkgs.mkShell { packages = [ pkgs.hugo ]; };
});
}