You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.2 KiB
Nix

{
inputs = {
nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable;
flake-utils-plus.url = github:numtide/flake-utils;
# Website template
papermod = {
url = github:adityatelange/hugo-PaperMod;
flake = false;
};
};
outputs = inputs@{ self, nixpkgs, flake-utils, papermod, ... }:
{
overlay = final: prev: {
n0emis-eu-website = with final; stdenv.mkDerivation {
name = "n0emis-eu";
src = self;
buildInputs = [ hugo ];
buildPhase = ''
mkdir -p themes
rm -rf themes/PaperMod
ln -s ${papermod} themes/PaperMod
hugo -v
'';
installPhase = ''
mv public $out
'';
};
};
} // (
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ self.overlay ];
};
in {
packages.leona-is-website = pkgs.n0emis-eu-website;
defaultPackage = pkgs.n0emis-eu-website;
devShell = pkgs.mkShell {
packages = with pkgs; [
hugo
];
};
}
)
);
}