refactor: remove duplication
This commit is contained in:
109 files changed
+2206
-3078
No files matched your search
@@ -27,8 +27,9 @@
|
||||
xkcdpass,
|
||||
}:
|
||||
|
||||
writeShellApplication {
|
||||
import ./script.nix { inherit lib writeShellApplication; } {
|
||||
name = "proxy-suite-install";
|
||||
script = ./installer.sh;
|
||||
runtimeInputs = [
|
||||
coreutils
|
||||
curl
|
||||
@@ -56,8 +57,4 @@ writeShellApplication {
|
||||
PSI_FLAKE_SRC = "${flakeSource}";
|
||||
PSI_STATE_VERSION = stateVersion;
|
||||
};
|
||||
text = lib.concatStringsSep "\n" [
|
||||
(builtins.readFile ./net-lib.sh)
|
||||
(builtins.readFile ./installer.sh)
|
||||
];
|
||||
}
|
||||
@@ -14,8 +14,9 @@
|
||||
systemd,
|
||||
}:
|
||||
|
||||
writeShellApplication {
|
||||
import ./script.nix { inherit lib writeShellApplication; } {
|
||||
name = "proxy-suite-net";
|
||||
script = ./net-rescue.sh;
|
||||
runtimeInputs = [
|
||||
coreutils
|
||||
curl
|
||||
@@ -27,8 +28,4 @@ writeShellApplication {
|
||||
iputils
|
||||
systemd
|
||||
];
|
||||
text = lib.concatStringsSep "\n" [
|
||||
(builtins.readFile ./net-lib.sh)
|
||||
(builtins.readFile ./net-rescue.sh)
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
# The console helpers are net-lib.sh plus one front end, wrapped with the tools they call.
|
||||
{ lib, writeShellApplication }:
|
||||
|
||||
{
|
||||
name,
|
||||
script,
|
||||
runtimeInputs,
|
||||
runtimeEnv ? { },
|
||||
}:
|
||||
writeShellApplication {
|
||||
inherit name runtimeInputs runtimeEnv;
|
||||
text = lib.concatStringsSep "\n" [
|
||||
(builtins.readFile ./net-lib.sh)
|
||||
(builtins.readFile script)
|
||||
];
|
||||
}
|
||||
@@ -321,7 +321,7 @@ in
|
||||
|
||||
services.getty.helpLine = ''
|
||||
|
||||
proxy-suite server ''${certName}. Share links (as ''${cfg.adminUser}):
|
||||
proxy-suite server ${certName}. Share links (as ${cfg.adminUser}):
|
||||
proxy-ctl inbounds link vless-reality --qr (or vless-tls, vless-ws)
|
||||
''
|
||||
+ lib.optionalString cfg.onion.enable " proxy-ctl inbounds link vless-reality --onion --qr (through Tor)\n"
|
||||
|
||||
Reference in new issue
Block a user