Compare commits

...

20 Commits

Author SHA1 Message Date
chn
0c49c71899 services.nginx.applications.main: fix 2023-12-29 20:22:21 +08:00
chn
b0e543d324 packages.server.ssh: enable ssh agent forward 2023-12-29 20:22:02 +08:00
chn
51c8a516ff packages.server: remove gnupg agent 2023-12-29 15:33:06 +08:00
chn
f3c8017959 Revert "try to enable codex"
This reverts commit 3867469fc5.
2023-12-28 21:04:45 +08:00
chn
3867469fc5 try to enable codex 2023-12-28 21:03:38 +08:00
chn
f23f7101e4 update zsh-lsd 2023-12-28 12:55:18 +08:00
chn
8eea6ffdc3 packages.server.zsh: remove zsh-nix-shell 2023-12-28 12:29:35 +08:00
chn
729df7ab63 update misskey 2023-12-28 11:05:52 +08:00
chn
c1737fcb08 packages.server.ssh: set askPassword to systemd-ask-password 2023-12-27 17:42:53 +08:00
chn
50862f0e33 users.chn: add forwardAgent 2023-12-27 17:18:04 +08:00
chn
5b30aebfae services.frpClient: stcp allow all users 2023-12-27 15:11:15 +08:00
chn
f5e82ee889 localPackages.misskey: use nodejs 21 2023-12-25 20:50:42 +08:00
chn
a6241a201a try to fix pc power bug 2023-12-25 20:50:15 +08:00
chn
db3571b8e5 revert nodejs update 2023-12-25 20:46:27 +08:00
chn
bd6a867ab3 localPackages.misskey: use nodejs 20 2023-12-24 22:46:33 +08:00
chn
045de2b18e update nodejs 2023-12-24 22:45:26 +08:00
chn
501df43b0c services.misskey: increase statement_timeout 2023-12-24 14:58:20 +08:00
chn
fee1f32a0a localPackages.misskey: remove re2 2023-12-24 14:40:27 +08:00
chn
71c4426e53 Merge branch 'misskey' 2023-12-24 09:22:30 +08:00
chn
7cd03dd163 packages.server: add hexo-cli 2023-12-23 22:43:39 +08:00
11 changed files with 27 additions and 64 deletions

4
flake.lock generated
View File

@@ -1140,11 +1140,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1702980585,
"lastModified": 1703507584,
"narHash": "sha256-GvjQ462NjjmA2OXGT5ZjHJGA7BrqfsrUpMx4Iq6xkrI=",
"owner": "CHN-beta",
"repo": "nixpkgs",
"rev": "8439a9c91674ecef22fd1e5ab8643b813fb5229d",
"rev": "105eaff164520aeca4401cf1e8cf87ef4f106a84",
"type": "github"
},
"original": {

View File

@@ -203,7 +203,7 @@
bugs =
[
"suspend-hibernate-no-platform" "hibernate-iwlwifi" "suspend-lid-no-wakeup" "xmunet"
"suspend-hibernate-waydroid"
"suspend-hibernate-waydroid" "power"
];
};
vps6 =

View File

@@ -4,13 +4,13 @@
}:
let
pname = "misskey";
version = "2023.12.0";
version = "2023.12.2";
src = fetchFromGitHub
{
owner = "CHN-beta";
repo = "misskey";
rev = "bec1dc37598b71c377643ee77330d4d6f7eb31f2";
sha256 = "sha256-svLpG4xQ2mtsJ6gm+Ap8fZKTOl5V68XybGDvymsV4F4=";
rev = "579e1b00c1dc053a598ac4fd777459067860cdea";
hash = "sha256-jrUqfj8RaF8JeQ6qh8O071o4IWXNhKz6XiC92htJsbY=";
fetchSubmodules = true;
};
originalPnpmPackage = mkPnpmPackage
@@ -25,53 +25,6 @@ let
export NODE_ENV=production
pnpm run migrateandstart
'';
re2 = stdenv.mkDerivation rec
{
pname = "re2";
version = "1.20.8";
srcs =
[
(fetchurl
{
url = "https://github.com/uhop/node-re2/releases/download/1.20.8/linux-x64-120.br";
sha256 = "0f2l658xxc2112mbqpkyfic3vhjgdyafbfi14b6n40skyd6lijcq";
})
(fetchurl
{
url = "https://github.com/uhop/node-re2/releases/download/1.20.8/linux-x64-120.gz";
sha256 = "1v5n8i16188xpwx1jr8gcc1a99v83hlbh5hldl4i376vh0lwsxlq";
})
(fetchurl
{
url = "https://github.com/uhop/node-re2/releases/download/1.20.8/linux-x64-115.br";
sha256 = "0cyqmgqk5cwik27wh4ynaf94v4w6p1fsavm07xh8xfmdim2sr9kd";
})
(fetchurl
{
url = "https://github.com/uhop/node-re2/releases/download/1.20.8/linux-x64-115.gz";
sha256 = "0i3iykw13d5qfd5s6pq6kx6cbd64vfb3w65f9bnj87qz44la84ic";
})
(fetchurl
{
url = "https://github.com/uhop/node-re2/releases/download/1.20.8/linux-x64-108.br";
sha256 = "1467frfapqhi839r2v0p0wh76si3lihwzwgl9098mj7mwhjfl4lx";
})
(fetchurl
{
url = "https://github.com/uhop/node-re2/releases/download/1.20.8/linux-x64-108.gz";
sha256 = "0hykpqdrn55x83v1kzz6bdvrp24hgz3rwmwbdfl2saz576krzg1c";
})
];
phases = [ "installPhase" ];
installPhase =
''
mkdir -p $out/${version}
for i in $srcs
do
cp $i $out/${version}/''${i#*-}
done
'';
};
in
stdenv.mkDerivation rec
{
@@ -83,8 +36,6 @@ in
nativeBuildInputs = buildInputs;
CYPRESS_RUN_BINARY = "${cypress}/bin/Cypress";
NODE_ENV = "production";
RE2_DOWNLOAD_MIRROR = "${re2}";
RE2_DOWNLOAD_SKIP_PATH = "true";
configurePhase =
''
export HOME=$NIX_BUILD_TOP # Some packages need a writable HOME
@@ -120,6 +71,6 @@ in
'';
passthru =
{
inherit originalPnpmPackage startScript re2;
inherit originalPnpmPackage startScript;
};
}

View File

@@ -78,6 +78,7 @@ inputs:
};
};
firefox.programs.firefox.enable = inputs.lib.mkForce false;
power.boot.kernelParams = [ "cpufreq.default_governor=powersave" ];
};
in
{

View File

@@ -48,7 +48,7 @@ inputs:
# office
todo-txt-cli
# development
gdb try inputs.topInputs.plasma-manager.packages.x86_64-linux.rc2nix
gdb try inputs.topInputs.plasma-manager.packages.x86_64-linux.rc2nix hexo-cli
] ++ (with inputs.config.boot.kernelPackages; [ cpupower usbip ]);
};
users.sharedModules = [(home-inputs:
@@ -108,7 +108,6 @@ inputs:
nix-index-database.comma.enable = true;
nix-index.enable = true;
command-not-found.enable = false;
gnupg.agent = { enable = true; enableSSHSupport = true; };
autojump.enable = true;
git =
{

View File

@@ -96,6 +96,13 @@ inputs:
else []
))
(attrsToList servers)));
programs.ssh =
{
startAgent = true;
enableAskPassword = true;
askPassword = "${inputs.pkgs.systemd}/bin/systemd-ask-password";
extraConfig = "AddKeysToAgent yes";
};
nixos.users.sharedModules =
[(hmInputs: {
config.programs.ssh =

View File

@@ -49,8 +49,8 @@ inputs:
{
owner = "z-shell";
repo = "zsh-lsd";
rev = "029a9cb0a9b39c9eb6c5b5100dd9182813332250";
sha256 = "sha256-oWjWnhiimlGBMaZlZB+OM47jd9hporKlPNwCx6524Rk=";
rev = "65bb5ac49190beda263aae552a9369127961632d";
hash = "sha256-JSNsfpgiqWhtmGQkC3B0R1Y1QnDKp9n0Zaqzjhwt7Xk=";
};
}
];
@@ -72,7 +72,6 @@ inputs:
{
enable = true;
plugins = [ "git" "colored-man-pages" "extract" "history-substring-search" "autojump" ];
customPkgs = with inputs.pkgs; [ zsh-nix-shell ];
};
};
};

View File

@@ -113,6 +113,7 @@ inputs:
type = "stcp";
transport.useCompression = true;
secretKey = inputs.config.sops.placeholder."frp/stcp/${stcp.name}";
allowUsers = [ "*" ];
inherit (stcp.value) localIp localPort;
})
(attrsToList frpClient.stcp));

View File

@@ -89,7 +89,7 @@ inputs:
user: misskey_${replaceStrings [ "-" ] [ "_" ] instance.name}
pass: ${placeholder."postgresql/misskey_${replaceStrings [ "-" ] [ "_" ] instance.name}"}
extra:
statement_timeout: 60000
statement_timeout: 600000
dbReplications: false
redis:
host: 127.0.0.1

View File

@@ -7,7 +7,8 @@ inputs:
config =
let
inherit (inputs.config.nixos.services.nginx.applications) main;
in
inherit (inputs.lib) mkIf;
in mkIf main.enable
{
nixos.services.nginx.https."chn.moe".location =
{

View File

@@ -5,6 +5,7 @@ inputs:
let
inherit (inputs.lib) mkIf;
inherit (inputs.config.nixos) users;
inherit (builtins) listToAttrs;
in mkIf (builtins.elem "chn" users.users)
{
users.users.chn =
@@ -42,7 +43,10 @@ inputs:
# identityFile = "~/.ssh/xmuhk_id_rsa";
xmuhk = { host = "xmuhk"; hostname = "10.26.14.56"; user = "xmuhk"; };
xmuhk2 = { host = "xmuhk2"; hostname = "183.233.219.132"; user = "xmuhk"; port = 62022; };
};
}
// (listToAttrs (map
(system: { name = system; value.forwardAgent = true; })
[ "vps6" "wireguard.vps6" "vps7" "wireguard.vps7" "wireguard.pc" "nas" "wireguard.nas" ]));
};
home.packages =
[