Compare commits

..

No commits in common. "293fbeff8aab373f33e038bf5464c2dd9b775de5" and "eb886c0c6ede3ce777bba5f044c68358ef0fdcc9" have entirely different histories.

8 changed files with 19 additions and 50 deletions

View File

@ -24,18 +24,17 @@
"blog": {
"flake": false,
"locked": {
"lastModified": 1729501441,
"narHash": "sha256-LHCg3sdVoBJ8lRu13meCHYc4Stb1b7sLPZKZxsZQG6A=",
"ref": "public",
"rev": "b35b74ef827d5a200e19163bf3c200d4908d7a3c",
"revCount": 27,
"lastModified": 1728704748,
"narHash": "sha256-3EjbWR/0pCoSLYeury+gPxvM8/2NMfE1i0/+N1FAsAc=",
"ref": "refs/heads/main",
"rev": "dd49995b4e610de537a30e359797cfb8f0971fe5",
"revCount": 24,
"type": "git",
"url": "file:///home/chn/repo/blog"
"url": "https://git.chn.moe/chn/blog.git"
},
"original": {
"ref": "public",
"type": "git",
"url": "file:///home/chn/repo/blog"
"url": "https://git.chn.moe/chn/blog.git"
}
},
"blurred-wallpaper": {
@ -735,11 +734,11 @@
"misskey": {
"flake": false,
"locked": {
"lastModified": 1729490489,
"narHash": "sha256-pYL5gN79GC3GZwjsWG5ufkYGVIg2SHe1ZckJqmUD3MI=",
"lastModified": 1727700498,
"narHash": "sha256-h0oJ9128xsNGLzLTssjnTT+11vW4y+jrjy6p9qq6jFE=",
"ref": "refs/heads/chn-mod",
"rev": "7aa5ed4066b0f48c808defaa0772dd6d703c80fa",
"revCount": 26236,
"rev": "1eeabe04311c4aed657b184666152eeb5e837df9",
"revCount": 26110,
"submodules": true,
"type": "git",
"url": "https://github.com/CHN-beta/misskey"
@ -991,11 +990,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1729472774,
"narHash": "sha256-PtDH6Y97ydp4a3IfIXVIq3+R5+mzVAoDnO9PiLexPKs=",
"lastModified": 1729303996,
"narHash": "sha256-exsGKmfs2a5C/Aq/N4nhC8P4f8V4c/J3DumTW8u4O3E=",
"owner": "CHN-beta",
"repo": "nixpkgs",
"rev": "44b28005c62c890f7c8feda855ba0e26223c5b59",
"rev": "cae35b471936203b970111f9c3d78e0477122610",
"type": "github"
},
"original": {

View File

@ -72,7 +72,7 @@
nu-scripts = { url = "github:nushell/nu_scripts"; flake = false; };
py4vasp = { url = "github:vasp-dev/py4vasp"; flake = false; };
pocketfft = { url = "github:mreineck/pocketfft"; flake = false; };
blog = { url = "git+file:///home/chn/repo/blog?ref=public"; flake = false; };
blog = { url = "git+https://git.chn.moe/chn/blog.git"; flake = false; };
nixos-wallpaper = { url = "git+https://git.chn.moe/chn/nixos-wallpaper.git"; flake = false; };
spectroscopy = { url = "github:skelton-group/Phonopy-Spectroscopy"; flake = false; };
};

View File

@ -111,8 +111,6 @@ inputs:
(inputs.localLib.attrsToList servers));
programs.ssh =
{
# maybe better network performance
package = inputs.pkgs.openssh_hpn;
startAgent = true;
enableAskPassword = true;
askPassword = "${inputs.pkgs.systemd}/bin/systemd-ask-password";

View File

@ -118,12 +118,6 @@ inputs:
xdg-desktop-portal = prev.xdg-desktop-portal.overrideAttrs (prev:
{ doCheck = false; nativeBuildInputs = prev.nativeBuildInputs ++ prev.nativeCheckInputs; });
gsl = prev.gsl.overrideAttrs { doCheck = false; };
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [(final: prev:
{
numcodecs = prev.numcodecs.overridePythonAttrs { doCheck = false; };
zarr = prev.zarr.overridePythonAttrs (prev:
{ disabledTests = prev.disabledTests or [] ++ [ "test_encode_decode_array_dtype_shape_v3" ]; });
})];
}
)
// (

View File

@ -103,7 +103,7 @@ inputs: rec
py4vasp = inputs.pkgs.callPackage ./py4vasp.nix { src = inputs.topInputs.py4vasp; };
pocketfft = inputs.pkgs.callPackage ./pocketfft.nix { src = inputs.topInputs.pocketfft; };
spectroscopy = inputs.pkgs.callPackage ./spectroscopy.nix { src = inputs.topInputs.spectroscopy; };
mirism = inputs.pkgs.callPackage ./mirism { inherit biu; stdenv = inputs.pkgs.clang18Stdenv; };
mirism = inputs.pkgs.callPackage ./mirism.nix { inherit biu; stdenv = inputs.pkgs.clang18Stdenv; };
fromYaml = content: builtins.fromJSON (builtins.readFile
(inputs.pkgs.runCommand "toJSON" {}

View File

@ -10,11 +10,10 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
endif()
find_package(biu REQUIRED)
find_package(httplib REQUIRED)
add_executable(mirism src/main.cpp)
target_compile_features(mirism PUBLIC cxx_std_23)
target_link_libraries(mirism PRIVATE biu::biu httplib::httplib)
target_link_libraries(mirism PRIVATE biu::biu)
install(TARGETS mirism RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

View File

@ -1,7 +1,7 @@
{ stdenv, cmake, pkg-config, biu, httplib }: stdenv.mkDerivation
{ stdenv, cmake, pkg-config, biu }: stdenv.mkDerivation
{
name = "mirism";
src = ./.;
buildInputs = [ biu httplib ];
buildInputs = [ biu ];
nativeBuildInputs = [ cmake pkg-config ];
}

View File

@ -1,21 +0,0 @@
# include <biu.hpp>
# include <httplib.h>
int main()
{
using namespace biu::literals;
httplib::SSLServer srv("/var/lib/acme/debug.mirism.one/fullchain.pem",
"/var/lib/acme/debug.mirism.one/key.pem");
srv.Get("/", [](const httplib::Request& req, httplib::Response& res) {
std::cout << "{}"_f(req.headers) << std::endl;
httplib::Client cli("https://github.com");
auto upstream_res = cli.Get("/");
res.headers = upstream_res->headers;
res.body = upstream_res->body;
res.status = upstream_res->status;
std::cout << "{}"_f(upstream_res->headers) << std::endl;
std::cout << "{}"_f(upstream_res->body) << std::endl;
});
srv.listen("127.0.0.1", 15641);
}