Add twitter archive

This commit is contained in:
Jez Cope 2023-07-10 17:20:58 +01:00
parent 1ef9e9ba70
commit f9f1939aaf
3 changed files with 25 additions and 5 deletions

View File

@ -33,7 +33,20 @@
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs",
"twitter-archive": "twitter-archive"
}
},
"twitter-archive": {
"flake": false,
"locked": {
"narHash": "sha256-XOaTvEWedFtofiTODpzzXyq60NZ8DsS4Tp2bLijIELE=",
"type": "tarball",
"url": "https://codeberg.org/api/v1/repos/jezcope/twitter-archive/archive/main.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://codeberg.org/api/v1/repos/jezcope/twitter-archive/archive/main.tar.gz"
}
}
},

View File

@ -3,8 +3,12 @@
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.twitter-archive = {
url = "https://codeberg.org/api/v1/repos/jezcope/twitter-archive/archive/main.tar.gz";
flake = false;
};
outputs = { self, nixpkgs, flake-utils }:
outputs = { self, nixpkgs, flake-utils, twitter-archive }:
{
overlay = self: super:
let
@ -20,7 +24,9 @@
paths = [ iosevka iosevka-aile iosevka-etoile ];
};
erambler = pkgs.callPackage ./nix/build.nix { inherit fonts; };
erambler = pkgs.callPackage ./nix/build.nix { inherit fonts twitter-archive; };
inherit twitter-archive;
};
nixosModule = import ./nix/server.nix { inherit self; };

View File

@ -1,15 +1,16 @@
{ pkgs, fonts, lndir, ... }:
{ pkgs, fonts, lndir, twitter-archive, ... }:
with pkgs;
stdenv.mkDerivation {
name = "erambler-html";
src = ../.;
nativeBuildInputs = [ hugo fonts ];
nativeBuildInputs = [ hugo fonts twitter-archive ];
buildPhase = "hugo";
installPhase = ''
mkdir $out
cp -R public/* public/.well-known "$out"
mkdir -p "$out/font"
${lndir}/bin/lndir -silent ${fonts} "$out/font"
ln -s ${twitter-archive} "$out/twitter-archive"
'';
}