add miifox.net

This commit is contained in:
Charlotte 🦝 Delenk 2022-06-11 15:04:50 +01:00
parent 39d65ed460
commit a3e27aecad
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122
5 changed files with 62 additions and 17 deletions

View file

@ -31,6 +31,22 @@
"type": "github"
}
},
"miifox-net": {
"flake": false,
"locked": {
"lastModified": 1648216492,
"narHash": "sha256-OKGPwQZjZXbXziJLSOE8K/0fCWCnvU/I2Lm3Vc8KD/o=",
"ref": "refs/heads/master",
"rev": "7826b9a3bec5dddd4b8a879c3396a1406fc37370",
"revCount": 5,
"type": "git",
"url": "https://git.chir.rs/CarolineHusky/MiiFox.net"
},
"original": {
"type": "git",
"url": "https://git.chir.rs/CarolineHusky/MiiFox.net"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1654953433,
@ -50,6 +66,7 @@
"inputs": {
"clean-s3-cache": "clean-s3-cache",
"flake-utils": "flake-utils",
"miifox-net": "miifox-net",
"nixpkgs": "nixpkgs"
}
}

View file

@ -8,20 +8,20 @@
# Source files for packages
clean-s3-cache.url = "git+https://gist.github.com/DarkKirb/533e9e8b9b6dd1badf9b103b4285dc4e";
clean-s3-cache.flake = false;
miifox-net.url = "git+https://git.chir.rs/CarolineHusky/MiiFox.net";
miifox-net.flake = false;
};
outputs =
{ self
, nixpkgs
, flake-utils
, ...
} @ inputs:
flake-utils.lib.eachSystem [ "aarch64-linux" "x86_64-linux" ] (
system:
let
pkgs = import nixpkgs { inherit system; };
in
rec {
outputs = {
self,
nixpkgs,
flake-utils,
...
} @ inputs:
flake-utils.lib.eachSystem ["aarch64-linux" "x86_64-linux"] (
system: let
pkgs = import nixpkgs {inherit system;};
in rec {
formatter = pkgs.alejandra;
devShells.default = pkgs.mkShell {
@ -30,9 +30,10 @@
];
};
packages = pkgs.lib.lists.foldl (a: b: a // b) { } (map (f: import f { inherit pkgs inputs; }) [
packages = pkgs.lib.lists.foldl (a: b: a // b) {} (map (f: import f {inherit pkgs inputs;}) [
./scripts/clean-s3-cache.nix
./web/old-homepage.nix
./web/miifox-net.nix
]);
hydraJobs = {

View file

@ -1,6 +1,9 @@
{ pkgs, inputs }: rec {
{
pkgs,
inputs,
}: rec {
clean-s3-cache-env = pkgs.python3.buildEnv.override {
extraLibs = with pkgs.python3Packages; [ boto3 ];
extraLibs = with pkgs.python3Packages; [boto3];
};
clean-s3-cache = pkgs.stdenvNoCC.mkDerivation {
pname = "clean-s3-cache";

24
web/miifox-net.nix Normal file
View file

@ -0,0 +1,24 @@
{
inputs,
pkgs,
...
}: {
miifox-net = pkgs.stdenvNoCC.mkDerivation {
pname = "miifox.net";
version = inputs.miifox-net.lastModifiedDate;
srcs = inputs.miifox-net;
nativeBuildInputs = with pkgs; [
python3Packages.chevron
xorg.lndir
];
buildPhase = ''
chevron -d index.json index.handlebars > index.html
'';
installPhase = ''
mkdir $out
lndir -silent ${inputs.miifox-net} $out
cp index.html $out
rm $out/index.json
'';
};
}

View file

@ -1,7 +1,7 @@
{ pkgs, ... }: {
{pkgs, ...}: {
homepage-old = pkgs.fetchzip {
url = "https://static.darkkirb.de/homepage.tar.zst";
sha256 = "sha256-T9fiDZSaAO9+YljPgQM7vEtJcs0tQF2Bd0BlsO4EyfE=";
nativeBuildInputs = [ pkgs.zstd ];
nativeBuildInputs = [pkgs.zstd];
};
}