elnudrop: host tatoeba API

inky
Elnu 9 months ago
parent 4bbd00cc9f
commit c393cbb98f

@ -1,5 +1,24 @@
{
"nodes": {
"apis": {
"inputs": {
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1691779970,
"narHash": "sha256-NMrLx5FJ/ueTw4FYKqZ9FBh+H1fVXnAs7Vvr+9By8N0=",
"ref": "refs/heads/main",
"rev": "e90adfaf87c68785af0f66becb0d5c8fc59b9e2f",
"revCount": 15,
"type": "git",
"url": "https://git.elnu.com/jichan.org/apis.git"
},
"original": {
"type": "git",
"url": "https://git.elnu.com/jichan.org/apis.git"
}
},
"beautysh": {
"inputs": {
"nixpkgs": [
@ -43,6 +62,24 @@
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1689068808,
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
@ -57,9 +94,9 @@
"type": "github"
}
},
"flake-utils_2": {
"flake-utils_3": {
"inputs": {
"systems": "systems_2"
"systems": "systems_3"
},
"locked": {
"lastModified": 1685518550,
@ -119,15 +156,15 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1691654369,
"narHash": "sha256-gSILTEx1jRaJjwZxRlnu3ZwMn1FVNk80qlwiCX8kmpo=",
"owner": "nixos",
"lastModified": 1691472822,
"narHash": "sha256-XVfYZ2oB3lNPVq6sHCY9WkdQ8lHoIDzzbpg8bB6oBxA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e",
"rev": "41c7605718399dcfa53dd7083793b6ae3bc969ff",
"type": "github"
},
"original": {
"owner": "nixos",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
@ -150,6 +187,38 @@
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1681358109,
"narHash": "sha256-eKyxW4OohHQx9Urxi7TQlFBTDWII+F+x2hklDOQPB50=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "96ba1c52e54e74c3197f4d43026b3f3d92e83ff9",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1691654369,
"narHash": "sha256-gSILTEx1jRaJjwZxRlnu3ZwMn1FVNk80qlwiCX8kmpo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1691186842,
"narHash": "sha256-wxBVCvZUwq+XS4N4t9NqsHV4E64cPVqQ2fdDISpjcw0=",
@ -168,8 +237,8 @@
"nixvim": {
"inputs": {
"beautysh": "beautysh",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_2",
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_4",
"pre-commit-hooks": "pre-commit-hooks"
},
"locked": {
@ -216,7 +285,7 @@
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils_2",
"flake-utils": "flake-utils_3",
"gitignore": "gitignore",
"nixpkgs": [
"nixvim",
@ -240,11 +309,31 @@
},
"root": {
"inputs": {
"apis": "apis",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"nixpkgs": "nixpkgs_3",
"nixvim": "nixvim"
}
},
"rust-overlay": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1691591308,
"narHash": "sha256-eeErUrPWCQwFHESL3vpNwkl8oyJPV6SRrVS9cPTEvYI=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "094512d7a7573ae2cb6db1a5ce4745a69b16fa46",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
@ -275,6 +364,21 @@
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"utils": {
"locked": {
"lastModified": 1678901627,

@ -4,6 +4,7 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixvim.url = "github:nix-community/nixvim";
apis.url = "git+https://git.elnu.com/jichan.org/apis.git";
home-manager = {
url = github:nix-community/home-manager;
inputs.nixpkgs.follows = "nixpkgs";

@ -8,6 +8,7 @@ let
};
lib = nixpkgs.lib;
configImports = [
inputs.apis.nixosModules.default
./configuration.nix
];
hmImports = [

@ -39,4 +39,6 @@
};
services.do-agent.enable = true;
services.tatoeba.enable = true;
}

@ -19,18 +19,18 @@ let host = "jichan.org"; in {
"/missing.min.css".root = "${../shared/502}";
# Formerly tatoeba.elnu.com
# https://git.elnu.com/ElnuDev/tatoeba-api
# https://git.elnu.com/jichan.org/apis
"/api/tatoeba/" = {
proxyPass = "http://elnuhub:3001";
proxyPass = "http://localhost:3001";
extraConfig = ''
rewrite ^/api/tatoeba/(.*) /$1 break;
'';
};
# Formerly images.elnu.com
# https://git.elnu.com/ElnuDev/image-api
# https://git.elnu.com/jichan.org/apis
"/api/images/" = {
proxyPass = "http://elnuhub:3002";
proxyPass = "http://localhost:3002";
extraConfig = ''
rewrite ^/api/images/(.*) /$1 break;
'';

Loading…
Cancel
Save