format
This commit is contained in:
parent
f0f281df61
commit
d825e28e45
19
flake.nix
19
flake.nix
|
@ -4,13 +4,16 @@
|
||||||
flake-utils.url = "flake-utils";
|
flake-utils.url = "flake-utils";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs =
|
||||||
|
{
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
flake-utils,
|
flake-utils,
|
||||||
}:
|
}:
|
||||||
flake-utils.lib.eachDefaultSystem (system: let
|
flake-utils.lib.eachDefaultSystem (
|
||||||
pkgs = import nixpkgs {inherit system;};
|
system:
|
||||||
|
let
|
||||||
|
pkgs = import nixpkgs { inherit system; };
|
||||||
papermod = pkgs.fetchFromGitHub {
|
papermod = pkgs.fetchFromGitHub {
|
||||||
owner = "adityatelange";
|
owner = "adityatelange";
|
||||||
repo = "hugo-PaperMod";
|
repo = "hugo-PaperMod";
|
||||||
|
@ -21,12 +24,14 @@
|
||||||
name = "website";
|
name = "website";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
postPatch = "mkdir themes && cp -r ${papermod} themes/papermod";
|
postPatch = "mkdir themes && cp -r ${papermod} themes/papermod";
|
||||||
nativeBuildInputs = [pkgs.hugo];
|
nativeBuildInputs = [ pkgs.hugo ];
|
||||||
buildPhase = "hugo";
|
buildPhase = "hugo";
|
||||||
installPhase = "cp -r public $out";
|
installPhase = "cp -r public $out";
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
packages.default = website;
|
packages.default = website;
|
||||||
devShells.default = pkgs.mkShell {packages = [pkgs.hugo];};
|
devShells.default = pkgs.mkShell { packages = [ pkgs.hugo ]; };
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue