leonard: Add amalie-mansaker-no
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
./services/wiki-wackattack-eu.nix
|
||||
./services/www-feal-no
|
||||
./services/www-kinealbrigtsen-no.nix
|
||||
./services/www-amalie-mansaker-no
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = lib.mkForce false;
|
||||
|
||||
11
hosts/leonard/services/www-amalie-mansaker-no/default.nix
Normal file
11
hosts/leonard/services/www-amalie-mansaker-no/default.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
services.nginx.virtualHosts."amalie.mansaker.no" = let
|
||||
siteContent = pkgs.callPackage ./site.nix { };
|
||||
in {
|
||||
locations = {
|
||||
"/".root = siteContent;
|
||||
};
|
||||
};
|
||||
}
|
||||
26
hosts/leonard/services/www-amalie-mansaker-no/site.nix
Normal file
26
hosts/leonard/services/www-amalie-mansaker-no/site.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ stdenv, fetchgit, hugo }:
|
||||
stdenv.mkDerivation {
|
||||
name = "www-amalie-mansaker-no";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://git.feal.no/amalieem/amalie.mansaker.no.git";
|
||||
fetchSubmodules = true;
|
||||
|
||||
rev = "49f9d5436f";
|
||||
hash = "sha256-KYAIL/MLMlaVaa5eJHy1RFw4NP7ZWDR3GRD2qgBDvY8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ hugo ];
|
||||
buildPhase = ''
|
||||
cp -r $src/* .
|
||||
${hugo}/bin/hugo
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out
|
||||
cp -r public/* $out/
|
||||
runHook postInstall
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user