Compare commits

...

11 Commits

Author SHA1 Message Date
chn
293fbeff8a update blog 2024-10-21 17:04:22 +08:00
chn
4e88fb0bb1 update misskey 2024-10-21 14:02:18 +08:00
chn
1163764286 modules.packages.ssh: use ssh hpn 2024-10-21 09:44:55 +08:00
chn
d6e0300f24 fix nodejs 2024-10-21 09:16:24 +08:00
chn
2039f5ecba make blog repo private
revert nodejs change
2024-10-21 00:53:53 +08:00
chn
b7592edc26 fix nodejs_20 2024-10-20 20:31:44 +08:00
chn
39bdf25764 Revert "modules.services.nextcloud: update"
This reverts commit f05358a7c2.
2024-10-20 19:15:52 +08:00
chn
f05358a7c2 modules.services.nextcloud: update 2024-10-20 19:13:52 +08:00
chn
4e0a1a48fd move fix into nixos 2024-10-20 19:11:19 +08:00
chn
3597f58f63 fix build 2024-10-20 10:28:56 +08:00
chn
5c5acd7dee packages.mirism: init server 2024-10-20 01:52:17 +08:00
8 changed files with 50 additions and 19 deletions

View File

@ -24,17 +24,18 @@
"blog": {
"flake": false,
"locked": {
"lastModified": 1728704748,
"narHash": "sha256-3EjbWR/0pCoSLYeury+gPxvM8/2NMfE1i0/+N1FAsAc=",
"ref": "refs/heads/main",
"rev": "dd49995b4e610de537a30e359797cfb8f0971fe5",
"revCount": 24,
"lastModified": 1729501441,
"narHash": "sha256-LHCg3sdVoBJ8lRu13meCHYc4Stb1b7sLPZKZxsZQG6A=",
"ref": "public",
"rev": "b35b74ef827d5a200e19163bf3c200d4908d7a3c",
"revCount": 27,
"type": "git",
"url": "https://git.chn.moe/chn/blog.git"
"url": "file:///home/chn/repo/blog"
},
"original": {
"ref": "public",
"type": "git",
"url": "https://git.chn.moe/chn/blog.git"
"url": "file:///home/chn/repo/blog"
}
},
"blurred-wallpaper": {
@ -734,11 +735,11 @@
"misskey": {
"flake": false,
"locked": {
"lastModified": 1727700498,
"narHash": "sha256-h0oJ9128xsNGLzLTssjnTT+11vW4y+jrjy6p9qq6jFE=",
"lastModified": 1729490489,
"narHash": "sha256-pYL5gN79GC3GZwjsWG5ufkYGVIg2SHe1ZckJqmUD3MI=",
"ref": "refs/heads/chn-mod",
"rev": "1eeabe04311c4aed657b184666152eeb5e837df9",
"revCount": 26110,
"rev": "7aa5ed4066b0f48c808defaa0772dd6d703c80fa",
"revCount": 26236,
"submodules": true,
"type": "git",
"url": "https://github.com/CHN-beta/misskey"
@ -990,11 +991,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1729303996,
"narHash": "sha256-exsGKmfs2a5C/Aq/N4nhC8P4f8V4c/J3DumTW8u4O3E=",
"lastModified": 1729472774,
"narHash": "sha256-PtDH6Y97ydp4a3IfIXVIq3+R5+mzVAoDnO9PiLexPKs=",
"owner": "CHN-beta",
"repo": "nixpkgs",
"rev": "cae35b471936203b970111f9c3d78e0477122610",
"rev": "44b28005c62c890f7c8feda855ba0e26223c5b59",
"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+https://git.chn.moe/chn/blog.git"; flake = false; };
blog = { url = "git+file:///home/chn/repo/blog?ref=public"; 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,6 +111,8 @@ 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,6 +118,12 @@ 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.nix { inherit biu; stdenv = inputs.pkgs.clang18Stdenv; };
mirism = inputs.pkgs.callPackage ./mirism { inherit biu; stdenv = inputs.pkgs.clang18Stdenv; };
fromYaml = content: builtins.fromJSON (builtins.readFile
(inputs.pkgs.runCommand "toJSON" {}

View File

@ -10,10 +10,11 @@ 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)
target_link_libraries(mirism PRIVATE biu::biu httplib::httplib)
install(TARGETS mirism RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

View File

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

View File

@ -0,0 +1,21 @@
# 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);
}