The Telegram secret recipes no longer depend on openssl (the host does not install it): they read 16 bytes from /dev/urandom with od and check the length before anything is encrypted, so a failure cannot store an empty secret. README, secrets/README.md and the proxy-suite header and warning agree. README: Serena's dashboard is started but not opened and listens on 127.0.0.1 only; the nix-ld note for REA now distinguishes standalone npm executables from .node add-ons; the Serena pin notes mention the stdenv.isLinux/isDarwin warnings. home-manager.overwriteBackup = true so a rewritten gtk.css or qt6ct.conf does not make a later switch fail on an existing .hm-backup. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JZ16yf4acmaSiHq81vyQ6Z
67 lines
1.8 KiB
Nix
67 lines
1.8 KiB
Nix
# proxy-suite (github:FUFSoB/proxy-suite-flake): zapret DPI bypass, the
|
|
# Telegram WebSocket proxy and the GUI. The MTProto secret is an agenix secret:
|
|
# secrets/tg-ws-proxy-secret.age the secret (32 hex digits)
|
|
# (nix run .#secret-from-file -- tg-ws-proxy-secret.age <file>)
|
|
# proxy-suite reads it through systemd LoadCredential, so root ownership is
|
|
# enough. Without the file the Telegram proxy stays off and a warning says so.
|
|
{
|
|
config,
|
|
inputs,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
tgSecret = config.meta.secretsDir + "/tg-ws-proxy-secret.age";
|
|
hasTgSecret = builtins.pathExists tgSecret;
|
|
in
|
|
{
|
|
flake.modules.nixos.proxy-suite =
|
|
{ config, ... }:
|
|
{
|
|
imports = [ inputs.proxy-suite.nixosModules.default ];
|
|
|
|
age.secrets = lib.optionalAttrs hasTgSecret {
|
|
tg-ws-proxy-secret = {
|
|
file = tgSecret;
|
|
mode = "0400";
|
|
};
|
|
};
|
|
|
|
services.proxy-suite = {
|
|
enable = true;
|
|
|
|
proxy = {
|
|
enable = false;
|
|
};
|
|
|
|
# perAppRouting = {
|
|
# enable = true;
|
|
# createDefaultProfiles = true;
|
|
# proxychains.enable = true;
|
|
# tun.enable = true;
|
|
# tproxy.enable = true;
|
|
# zapret.enable = true;
|
|
# };
|
|
|
|
zapret = {
|
|
enable = true;
|
|
zapret-discord-youtube.configName = "general(ALT)";
|
|
};
|
|
|
|
tgWsProxy = {
|
|
enable = hasTgSecret;
|
|
secretFile = if hasTgSecret then config.age.secrets.tg-ws-proxy-secret.path else null;
|
|
bypassTransparentProxy = true;
|
|
};
|
|
|
|
gui.enable = true;
|
|
};
|
|
|
|
warnings = lib.optional (!hasTgSecret) ''
|
|
The Telegram WebSocket proxy (services.proxy-suite.tgWsProxy) is off:
|
|
secrets/tg-ws-proxy-secret.age is missing. Create it with the command in
|
|
secrets/README.md (32 random hex digits) and `git add` it.
|
|
'';
|
|
};
|
|
}
|