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.
49 lines
1.2 KiB
Nix
49 lines
1.2 KiB
Nix
2 years ago
|
{
|
||
|
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
|
||
|
ln -s ${papermod} themes/PaperMod
|
||
|
hugo --minify
|
||
|
'';
|
||
|
installPhase = ''
|
||
|
cp -r 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
|
||
|
];
|
||
|
};
|
||
|
}
|
||
|
)
|
||
|
);
|
||
|
}
|