This commit is contained in:
4DBug
2025-03-22 16:27:01 -05:00
parent 6edfada411
commit e38cb608c3
16 changed files with 91 additions and 88 deletions

View File

@@ -1,5 +1,4 @@
{ config, lib, pkgs, ... }:
{ lib, ... }:
{
imports = [
@@ -9,7 +8,7 @@
];
nixpkgs.config.allowUnfree = true;
services.flatpak = {
enable = true;
@@ -32,16 +31,16 @@
pico = "ssh pico.sh";
# tuns name port
tuns = "bash -c '\''if [ \"$#\" -ne 2 ]; then echo \"Usage: tun name port\"; exit 1; fi;
if [[ \"$1\" =~ ^[0-9]+$ ]]; then port=\"$1\"; name=\"$2\";
elif [[ \"$2\" =~ ^[0-9]+$ ]]; then port=\"$2\"; name=\"$1\";
else echo \"Error: One argument must be a number (port)\"; exit 1; fi;
tuns = "bash -c '\''if [ \"$#\" -ne 2 ]; then echo \"Usage: tun name port\"; exit 1; fi;
if [[ \"$1\" =~ ^[0-9]+$ ]]; then port=\"$1\"; name=\"$2\";
elif [[ \"$2\" =~ ^[0-9]+$ ]]; then port=\"$2\"; name=\"$1\";
else echo \"Error: One argument must be a number (port)\"; exit 1; fi;
ssh -R \"$\{name}:80:localhost:$\{port}\" tuns.sh'\'' _";
# pgs name directory
pgs = "bash -c '\''if [ \"$#\" -ne 2 ]; then echo \"Usage: pgs NAME DIRECTORY\"; exit 1; fi; rsync -rv \"$2\" pgs.sh:/\"$1\"'\'' _";
};
dconf.enable = lib.mkDefault true;
firefox.enable = true;
@@ -69,4 +68,4 @@ ssh -R \"$\{name}:80:localhost:$\{port}\" tuns.sh'\'' _";
dataDir = "/home/bug/";
};
};
}
}