diff --git a/nixos/system/bfs/bfs.nix b/nixos/system/bfs/bfs.nix index d03af41..fd0d7b3 100644 --- a/nixos/system/bfs/bfs.nix +++ b/nixos/system/bfs/bfs.nix @@ -10,6 +10,7 @@ ... }: let xrayPort = 10086; + matrixDomain = "accord.tube"; in { # TODO: # white list @@ -28,6 +29,8 @@ in { currentServer = { matrix = { + secretsFile = config.sops.secrets."matrix/secrets".path; + turnSecretFile = config.sops.secrets."matrix/turn-secret".path; postgresql = { port = 5432; initialEnvFile = config.sops.secrets."init-postgresql".path; @@ -87,8 +90,14 @@ in { age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; defaultSopsFile = ../../../sus/bfs.xray.yaml; - secrets."config" = {}; - secrets."init-postgresql" = {}; + secrets."config" = {}; + secrets."init-postgresql" = {}; + secrets."matrix/secrets" = {}; + secrets."matrix/turn-secret" = { + owner = "turnserver"; + group = "turnserver"; + mode = "0400"; + }; }; networking.firewall = { diff --git a/nixos/system/bfs/matrix.nix b/nixos/system/bfs/matrix.nix index dc1056e..78bbe27 100644 --- a/nixos/system/bfs/matrix.nix +++ b/nixos/system/bfs/matrix.nix @@ -2,33 +2,43 @@ cfg = config.currentServer.matrix; in { options = { - currentServer.matrix = { - postgresql = { - port = lib.mkOption { - type = lib.types.port; - default = 5432; - description = '' - postgres port - ''; - }; - initialEnvFile = lib.mkOption { - type = lib.types.path; - description = '' - path to env file with postgresql initial secrets - - content: - POSTGRESQL_PASSWORD= - ''; - }; - }; - matrixDomain = lib.mkOption { - type = lib.types.str; - description = '' - domain to matrix - ''; - }; + currentServer.matrix = { + secretsFile = lib.mkOption { + type = lib.types.path; + description = '' + path to env file with matrix secrets + content: + registration_shared_secret: + macroon_secret_key + form_secret + ''; }; + postgresql = { + port = lib.mkOption { + type = lib.types.port; + default = 5432; + description = '' + postgres port + ''; + }; + initialEnvFile = lib.mkOption { + type = lib.types.path; + description = '' + path to env file with postgresql initial secrets + + content: + POSTGRESQL_PASSWORD= + ''; + }; + }; + matrixDomain = lib.mkOption { + type = lib.types.str; + description = '' + domain to matrix + ''; + }; + }; }; config = { services.matrix-synapse = { @@ -59,9 +69,9 @@ in { enable_registration = true; enable_registration_without_verification = true; - registration_shared_secret = "secret1"; - macaroon_secret_key = "secret2"; - form_secret = "secret3"; + extraConfigFiles = [ + cfg.secretsFile + ]; }; }; diff --git a/nixos/system/bfs/voice-tune.nix b/nixos/system/bfs/voice-tune.nix index 32e936a..ed415db 100644 --- a/nixos/system/bfs/voice-tune.nix +++ b/nixos/system/bfs/voice-tune.nix @@ -2,12 +2,24 @@ cfg = config.currentServer.matrix; shared_secret = "secret"; in { + options = { + currentServer.matrix = { + turnSecretFile = lib.mkOption { + type = lib.types.path; + description = '' + path to env file with matrix secrets + + just raw secret + ''; + }; + }; + }; config = { services.coturn = rec { enable = true; realm = cfg.matrixDomain; use-auth-secret = true; - static-auth-secret = shared_secret; + static-auth-secret-file = cfg.turnSecretFile; cert = "${config.security.acme.certs.${realm}.directory}/full.pem"; pkey = "${config.security.acme.certs.${realm}.directory}/key.pem"; listening-ips = ["188.137.254.58"]; @@ -35,7 +47,6 @@ in { "turn:${cfg.matrixDomain}:3478?transport=udp" "turn:${cfg.matrixDomain}:3478?transport=tcp" ]; - turn_shared_secret = shared_secret; }; }; } diff --git a/package/accord/accord.sh b/package/accord/accord.sh index 63028cf..2198d0c 100644 --- a/package/accord/accord.sh +++ b/package/accord/accord.sh @@ -1,48 +1,77 @@ #!/bin/dash -# LISTEN -# ssh -NL localhost:42001:localhost:42001 root@hecticb -# -# socat TCP-LISTEN:42001,bind=127.0.0.1,fork - | mpv --no-cache --demuxer=rawaudio --audio-channels=mono --audio-samplerate=44100 --aid=1 - +exec 2>err.log - -# SEND -# ssh -NR localhost:42002:localhost:42002 root@hectic-lab -# -# ffmpeg -f pulse -i default -t 10 -ar 44100 -f wav tcp:127.0.0.1:42002 +PANEL_H=20 old_stty=$(stty -g) +main() { + make_panel_space + + cols=$(tput cols) + lines=$(tput lines) + top=$(( lines - PANEL_H + 1 )) + [ "$top" -lt 1 ] && top=1 + + msg="Welcome to accord" + w=$(( ${#msg} + 4 )) + h=5 + x=$(( (cols - w) / 2 )) + y=$(( top + (PANEL_H - h) / 2 )) + + draw_box "$x" "$y" "$w" "$h" "$msg" + + key=$(read_key) + + case "$key" in + l) + clear_panel + msg="I love you" + w=$(( ${#msg} + 4 )) + x=$(( (cols - w) / 2 )) + draw_box "$x" "$y" "$w" "$h" "$msg" + key=$(read_key) + ;; + s) + clear_panel + + key=$(read_key) + esac +} + +clear_panel() { + cols=$(tput cols) + lines=$(tput lines) + top=$(( lines - PANEL_H + 1 )) + [ "$top" -lt 1 ] && top=1 + + row=$top + while [ "$row" -le "$lines" ]; do + printf '\033[%d;1H\033[2K' "$row" + row=$((row+1)) + done +} + cleanup() { + clear_panel + stty "$old_stty" - tput rmcup 2>/dev/null || printf '\033[?1049l' # leave alt screen tput sgr0 tput cnorm + + # NOTE(yukkop): move cursor to where panel started, so shell prompt + # continues “right after” previous output + lines=$(tput lines) + row=$(( lines - PANEL_H + 1 )) + [ "$row" -lt 1 ] && row=1 + printf '\033[%d;1H' "$row" } trap cleanup EXIT INT TERM -# enter alternate screen -tput smcup 2>/dev/null || printf '\033[?1049h' stty -echo raw tput civis -msg="Press any key to continue" -cols=$(tput cols) -lines=$(tput lines) - -w=$(( ${#msg} + 4 )) -h=5 -x=$(( (cols - w) / 2 )) -y=$(( (lines - h) / 2 )) - -clear_screan() { - # clear *inside* alt screen - printf '\033[2J' - printf '\033[H' -} - -clear_screan - draw_box() { x=$1 y=$2 @@ -78,18 +107,13 @@ draw_box() { done } -msg="Welcome to accord" - -cols=$(tput cols) -lines=$(tput lines) - -w=$(( ${#msg} + 4 )) -h=5 -x=$(( (cols - w) / 2 )) -y=$(( (lines - h) / 2 )) - -# first page -draw_box "$x" "$y" "$w" "$h" "$msg" +make_panel_space() { + i=0 + while [ "$i" -lt "$PANEL_H" ]; do + printf '\n' + i=$((i+1)) + done +} read_key() { k=$(dd bs=1 count=1 2>/dev/null || true) @@ -99,17 +123,8 @@ read_key() { printf '%s' "$k" } -key=$(read_key) +. ./frames.sh -case "$key" in - l) - clear_screan - - msg="I love you" - w=$(( ${#msg} + 4 )) - x=$(( (cols - w) / 2 )) - - draw_box "$x" "$y" "$w" "$h" "$msg" - key=$(read_key) - ;; -esac +if ! [ ${AS_LIBRARY+x} ]; then + main +fi diff --git a/package/accord/err.log b/package/accord/err.log new file mode 100644 index 0000000..5893648 --- /dev/null +++ b/package/accord/err.log @@ -0,0 +1 @@ +accord.sh: line 122: .: frames.sh: file not found diff --git a/package/accord/frames.sh b/package/accord/frames.sh new file mode 100644 index 0000000..3def982 --- /dev/null +++ b/package/accord/frames.sh @@ -0,0 +1,306 @@ +frame_000() { + printf '%b' '[?25l  +  +  + ▐▆▃▃▃▃▃▃▃▅▆  + ▂▅▆▔▆▀▃▘▂▐▂▁▂▀▔▂▗▐  + ▘▅▅▗▁▃▅▘▂▂▀▃▐▊▐▃▁▔▋  + ▊▝▗▆▀▃▆▔▝▔▀▂▂▆▆▂▂▃▆▊  + ▊▎▗▍▐▎▁▗▀▝▅▃▁▔▔▆▂▀▆▊  + ▖▕▍▝▊▝▝▍▋▆▅▃▆▆▃▀▅▁▘  + ▊▎▕▃▂▖▅▅▃▀▂▃▞▘▖▅▋▊  + ▔▅▅ ▝▁▐▀▗▃▀▀▀▖▅▗▘  + ▐▗▋ ▖▃▐  + ▅▝▃ ▆▆  +  +  +[?25h' +} +frame_001() { + printf '%b' '[?25l  +  +  + ▐▆▃▃▃▃▃▃▃▅▆  + ▂▅▆▔▆▀▃▘▂▐▂▁▂▀▔▂▗▐  + ▘▅▅▗▁▃▅▘▂▂▀▃▐▊▐▃▁▔▋  + ▊▝▗▆▀▃▆▔▝▔▀▂▂▆▆▂▂▃▆▊  + ▊▎▗▍▐▎▁▗▀▝▅▃▁▔▔▆▂▀▆▊  + ▖▕▍▝▊▝▝▍▋▆▅▃▆▆▃▀▅▁▘  + ▊▎▕▃▂▖▅▅▃▀▂▃▞▘▖▅▋▊  + ▔▅▅ ▝▁▐▀▗▃▀▀▀▖▅▗▘  + ▐▗▋ ▖▃▐  + ▅▝▃ ▆▆  +  +  +[?25h' +} +frame_002() { + printf '%b' '[?25l  +  +  + ▁ ▁▁  + ▁▂▃▃▀▀▃▁▂▂▔▅▆▆▆▆▅▅▖  + ▃▔▔▆▆▆▃▃▅▆▆▅▃▘▂▂▂▂▂▘▋  + ▊▐▝▃▃▂▁▁▁▂▂▆▆▝▂▂▂▂▂▗▅▔  + ▕▞▁▀▃▃▃▃▀▀▀▀▅▃▂▆▔▆▊▐  + ▔▅▃▃▂▁▁▁▁▂▁▆▅▀▀▂▂▀  + ▔▆▆▆▆▔  +  +  +  +  +  +[?25h' +} +frame_003() { + printf '%b' '[?25l  +  +  +  + ▗▀▀▂▃  + ▂▅▅▃▃▀▀▀▀▅▅▅▆▔▂▊▂▔▖  + ▗▘▘▗▘▐▔▂▘▂▅▀▃▗▅▅▀▐▅▆  + ▗▘▊▔▘▝▅▆▔▂▃▅▀▀▀▀▀▀▝▍  + ▝▖▃▃▀▀▃▀▀▅▅▅▀▀▅▁▂▃▀  + ▆▅▀▃▂▁▁▁▂▃▀▅▔  +  +  +  +  +  +[?25h' +} +frame_004() { + printf '%b' '[?25l  +  +  +  + ▁▂▂▂▁▁▁  + ▋▃▃▃▅▅▞▀▃▂▁  + ▃▆▔█▔▕▊▍▅▆▅▀▆▀  + ▊▍▖▔▔▔▂▁▝▍▁▗▐▖▃▝  + ▝▁▂▂▁▗▕▘▆▎▗▆▔▆▕  + ▆▀▃▂▁▁▂▃▁▁▁▁▘  + ▔▔▔  +  +  +  +  +[?25h' +} +frame_005() { + printf '%b' '[?25l  +  +  +  + ▁▁▁▁ ▁▁  + ▀▆▆▔▔▔▔▆▆▔▀▃▂▔▆▀  + ▕▖▀▃▂▂▂▆▀▀▀▍▗▀▘▘▕▕  + ▔▀▖▆▝▔▅▅▅▘▂▘▍▁▁▗▔  + ▍▀▅▅▀▆▐▋▀▀▅▁▁  + ▕▁▃▃▂▁▁▂▁▂▀▅▔  +  +  +  +  +  +[?25h' +} +frame_006() { + printf '%b' '[?25l  +  +  + ▁▁  + ▁▃▃▅▅▀▀▅▃▀▅▔▅▅▆▆▏  + ▂▔▔▅▀▃▃▔▆▀▍▐▂▘▔▀▃▔▋  + ▊▍▀▃▂▁▁▂▆▆▝▂▁▔▆▆▀▝▅▎  + ▃▁▆▆▀▃▅▀▃▂▆▔▆▅▃▀▅▗  + ▆▅▃▁▁▂▁▅▀▃▃▃▃▁▂▘  + ▔▔▆▅▅▆▆▔  +  +  +  +  +  +[?25h' +} +frame_007() { + printf '%b' '[?25l  +  +  + ▁ ▁▁  + ▁▂▃▃▀▀▃▁▂▂▔▅▆▆▆▆▅▅▖  + ▃▔▔▆▆▆▃▃▅▆▆▅▃▘▂▂▂▂▂▘▋  + ▊▐▝▃▃▂▁▁▁▂▂▆▆▝▂▂▂▂▂▗▅▔  + ▕▞▁▀▃▃▃▃▀▀▀▀▅▃▂▆▔▆▊▐  + ▔▅▃▃▂▁▁▁▁▂▁▆▅▀▀▂▂▀  + ▔▆▆▆▆▔  +  +  +  +  +  +[?25h' +} +frame_008() { + printf '%b' '[?25l  +  +  +  + ▗▀▀▂▃  + ▂▅▅▃▃▀▀▀▀▅▅▅▆▔▂▊▂▔▖  + ▗▘▘▗▘▐▔▂▘▂▅▀▃▗▅▅▀▐▅▆  + ▗▘▊▔▘▝▅▆▔▂▃▅▀▀▀▀▀▀▝▍  + ▝▖▃▃▀▀▃▀▀▅▅▅▀▀▅▁▂▃▀  + ▆▅▀▃▂▁▁▁▂▃▀▅▔  +  +  +  +  +  +[?25h' +} +frame_009() { + printf '%b' '[?25l  +  +  +  + ▁▂▂▂▁▁▁  + ▋▃▃▃▅▅▞▀▃▂▁  + ▃▆▔█▔▕▊▍▅▆▅▀▆▀  + ▊▍▖▔▔▔▂▁▝▍▁▗▐▖▃▝  + ▝▁▂▂▁▗▕▘▆▎▗▆▔▆▕  + ▆▀▃▂▁▁▂▃▁▁▁▁▘  + ▔▔▔  +  +  +  +  +[?25h' +} +frame_010() { + printf '%b' '[?25l  +  +  +  + ▁▁▁▁ ▁▁  + ▀▆▆▔▔▔▔▆▆▔▀▃▂▔▆▀  + ▕▖▀▃▂▂▂▆▀▀▀▍▗▀▘▘▕▕  + ▔▀▖▆▝▔▅▅▅▘▂▘▍▁▁▗▔  + ▍▀▅▅▀▆▐▋▀▀▅▁▁  + ▕▁▃▃▂▁▁▂▁▂▀▅▔  +  +  +  +  +  +[?25h' +} +frame_011() { + printf '%b' '[?25l  +  +  + ▁▁  + ▁▃▃▅▅▀▀▅▃▀▅▔▅▅▆▆▏  + ▂▔▔▅▀▃▃▔▆▀▍▐▂▘▔▀▃▔▋  + ▊▍▀▃▂▁▁▂▆▆▝▂▁▔▆▆▀▝▅▎  + ▃▁▆▆▀▃▅▀▃▂▆▔▆▅▃▀▅▗  + ▆▅▃▁▁▂▁▅▀▃▃▃▃▁▂▘  + ▔▔▆▅▅▆▆▔  +  +  +  +  +  +[?25h' +} +frame_012() { + printf '%b' '[?25l  +  +  + ▁ ▁▁  + ▁▂▃▃▀▀▃▁▂▂▔▅▆▆▆▆▅▅▖  + ▃▔▔▆▆▆▃▃▅▆▆▅▃▘▂▂▂▂▂▘▋  + ▊▐▝▃▃▂▁▁▁▂▂▆▆▝▂▂▂▂▂▗▅▔  + ▕▞▁▀▃▃▃▃▀▀▀▀▅▃▂▆▔▆▊▐  + ▔▅▃▃▂▁▁▁▁▂▁▆▅▀▀▂▂▀  + ▔▆▆▆▆▔  +  +  +  +  +  +[?25h' +} +frame_013() { + printf '%b' '[?25l  +  +  +  + ▗▀▀▂▃  + ▂▅▅▃▃▀▀▀▀▅▅▅▆▔▂▊▂▔▖  + ▗▘▘▗▘▐▔▂▘▂▅▀▃▗▅▅▀▐▅▆  + ▗▘▊▔▘▝▅▆▔▂▃▅▀▀▀▀▀▀▝▍  + ▝▖▃▃▀▀▃▀▀▅▅▅▀▀▅▁▂▃▀  + ▆▅▀▃▂▁▁▁▂▃▀▅▔  +  +  +  +  +  +[?25h' +} +frame_014() { + printf '%b' '[?25l  +  +  +  + ▁▂▂▂▁▁▁  + ▋▃▃▃▅▅▞▀▃▂▁  + ▃▆▔█▔▕▊▍▅▆▅▀▆▀  + ▊▍▖▔▔▔▂▁▝▍▁▗▐▖▃▝  + ▝▁▂▂▁▗▕▘▆▎▗▆▔▆▕  + ▆▀▃▂▁▁▂▃▁▁▁▁▘  + ▔▔▔  +  +  +  +  +[?25h' +} +frame_015() { + printf '%b' '[?25l  +  +  +  + ▁▁▁▁ ▁▁  + ▀▆▆▔▔▔▔▆▆▔▀▃▂▔▆▀  + ▕▖▀▃▂▂▂▆▀▀▀▍▗▀▘▘▕▕  + ▔▀▖▆▝▔▅▅▅▘▂▘▍▁▁▗▔  + ▍▀▅▅▀▆▐▋▀▀▅▁▁  + ▕▁▃▃▂▁▁▂▁▂▀▅▔  +  +  +  +  +  +[?25h' +} +frame_016() { + printf '%b' '[?25l  +  +  + ▁▁  + ▁▃▃▅▅▀▀▅▃▀▅▔▅▅▆▆▏  + ▂▔▔▅▀▃▃▔▆▀▍▐▂▘▔▀▃▔▋  + ▊▍▀▃▂▁▁▂▆▆▝▂▁▔▆▆▀▝▅▎  + ▃▁▆▆▀▃▅▀▃▂▆▔▆▅▃▀▅▗  + ▆▅▃▁▁▂▁▅▀▃▃▃▃▁▂▘  + ▔▔▆▅▅▆▆▔  +  +  +  +  +  +[?25h' +} diff --git a/package/accord/spining-cat/frame-000.png b/package/accord/spining-cat/frame-000.png new file mode 100644 index 0000000..9c95773 Binary files /dev/null and b/package/accord/spining-cat/frame-000.png differ diff --git a/package/accord/spining-cat/frame-001.png b/package/accord/spining-cat/frame-001.png new file mode 100644 index 0000000..9c95773 Binary files /dev/null and b/package/accord/spining-cat/frame-001.png differ diff --git a/package/accord/spining-cat/frame-002.png b/package/accord/spining-cat/frame-002.png new file mode 100644 index 0000000..d82db23 Binary files /dev/null and b/package/accord/spining-cat/frame-002.png differ diff --git a/package/accord/spining-cat/frame-003.png b/package/accord/spining-cat/frame-003.png new file mode 100644 index 0000000..739d3df Binary files /dev/null and b/package/accord/spining-cat/frame-003.png differ diff --git a/package/accord/spining-cat/frame-004.png b/package/accord/spining-cat/frame-004.png new file mode 100644 index 0000000..89c8fbe Binary files /dev/null and b/package/accord/spining-cat/frame-004.png differ diff --git a/package/accord/spining-cat/frame-005.png b/package/accord/spining-cat/frame-005.png new file mode 100644 index 0000000..4ea59c2 Binary files /dev/null and b/package/accord/spining-cat/frame-005.png differ diff --git a/package/accord/spining-cat/frame-006.png b/package/accord/spining-cat/frame-006.png new file mode 100644 index 0000000..bdbbc69 Binary files /dev/null and b/package/accord/spining-cat/frame-006.png differ diff --git a/package/accord/spining-cat/frame-007.png b/package/accord/spining-cat/frame-007.png new file mode 100644 index 0000000..ac0472b Binary files /dev/null and b/package/accord/spining-cat/frame-007.png differ diff --git a/package/accord/spining-cat/frame-008.png b/package/accord/spining-cat/frame-008.png new file mode 100644 index 0000000..739d3df Binary files /dev/null and b/package/accord/spining-cat/frame-008.png differ diff --git a/package/accord/spining-cat/frame-009.png b/package/accord/spining-cat/frame-009.png new file mode 100644 index 0000000..89c8fbe Binary files /dev/null and b/package/accord/spining-cat/frame-009.png differ diff --git a/package/accord/spining-cat/frame-010.png b/package/accord/spining-cat/frame-010.png new file mode 100644 index 0000000..4ea59c2 Binary files /dev/null and b/package/accord/spining-cat/frame-010.png differ diff --git a/package/accord/spining-cat/frame-011.png b/package/accord/spining-cat/frame-011.png new file mode 100644 index 0000000..bdbbc69 Binary files /dev/null and b/package/accord/spining-cat/frame-011.png differ diff --git a/package/accord/spining-cat/frame-012.png b/package/accord/spining-cat/frame-012.png new file mode 100644 index 0000000..ac0472b Binary files /dev/null and b/package/accord/spining-cat/frame-012.png differ diff --git a/package/accord/spining-cat/frame-013.png b/package/accord/spining-cat/frame-013.png new file mode 100644 index 0000000..739d3df Binary files /dev/null and b/package/accord/spining-cat/frame-013.png differ diff --git a/package/accord/spining-cat/frame-014.png b/package/accord/spining-cat/frame-014.png new file mode 100644 index 0000000..89c8fbe Binary files /dev/null and b/package/accord/spining-cat/frame-014.png differ diff --git a/package/accord/spining-cat/frame-015.png b/package/accord/spining-cat/frame-015.png new file mode 100644 index 0000000..4ea59c2 Binary files /dev/null and b/package/accord/spining-cat/frame-015.png differ diff --git a/package/accord/spining-cat/frame-016.png b/package/accord/spining-cat/frame-016.png new file mode 100644 index 0000000..bdbbc69 Binary files /dev/null and b/package/accord/spining-cat/frame-016.png differ diff --git a/package/accord/spining-cat/o.gif b/package/accord/spining-cat/o.gif new file mode 100644 index 0000000..b8809e3 Binary files /dev/null and b/package/accord/spining-cat/o.gif differ diff --git a/package/accord/spining-cat/text b/package/accord/spining-cat/text new file mode 100644 index 0000000..e8a3307 --- /dev/null +++ b/package/accord/spining-cat/text @@ -0,0 +1,306 @@ +__spining_cat_frame_000() { + printf '%b' '[?25l  +  +  + ▐▆▃▃▃▃▃▃▃▅▆  + ▂▅▆▔▆▀▃▘▂▐▂▁▂▀▔▂▗▐  + ▘▅▅▗▁▃▅▘▂▂▀▃▐▊▐▃▁▔▋  + ▊▝▗▆▀▃▆▔▝▔▀▂▂▆▆▂▂▃▆▊  + ▊▎▗▍▐▎▁▗▀▝▅▃▁▔▔▆▂▀▆▊  + ▖▕▍▝▊▝▝▍▋▆▅▃▆▆▃▀▅▁▘  + ▊▎▕▃▂▖▅▅▃▀▂▃▞▘▖▅▋▊  + ▔▅▅ ▝▁▐▀▗▃▀▀▀▖▅▗▘  + ▐▗▋ ▖▃▐  + ▅▝▃ ▆▆  +  +  +[?25h' +} +__spining_cat_frame_001() { + printf '%b' '[?25l  +  +  + ▐▆▃▃▃▃▃▃▃▅▆  + ▂▅▆▔▆▀▃▘▂▐▂▁▂▀▔▂▗▐  + ▘▅▅▗▁▃▅▘▂▂▀▃▐▊▐▃▁▔▋  + ▊▝▗▆▀▃▆▔▝▔▀▂▂▆▆▂▂▃▆▊  + ▊▎▗▍▐▎▁▗▀▝▅▃▁▔▔▆▂▀▆▊  + ▖▕▍▝▊▝▝▍▋▆▅▃▆▆▃▀▅▁▘  + ▊▎▕▃▂▖▅▅▃▀▂▃▞▘▖▅▋▊  + ▔▅▅ ▝▁▐▀▗▃▀▀▀▖▅▗▘  + ▐▗▋ ▖▃▐  + ▅▝▃ ▆▆  +  +  +[?25h' +} +__spining_cat_frame_002() { + printf '%b' '[?25l  +  +  + ▁ ▁▁  + ▁▂▃▃▀▀▃▁▂▂▔▅▆▆▆▆▅▅▖  + ▃▔▔▆▆▆▃▃▅▆▆▅▃▘▂▂▂▂▂▘▋  + ▊▐▝▃▃▂▁▁▁▂▂▆▆▝▂▂▂▂▂▗▅▔  + ▕▞▁▀▃▃▃▃▀▀▀▀▅▃▂▆▔▆▊▐  + ▔▅▃▃▂▁▁▁▁▂▁▆▅▀▀▂▂▀  + ▔▆▆▆▆▔  +  +  +  +  +  +[?25h' +} +__spining_cat_frame_003() { + printf '%b' '[?25l  +  +  +  + ▗▀▀▂▃  + ▂▅▅▃▃▀▀▀▀▅▅▅▆▔▂▊▂▔▖  + ▗▘▘▗▘▐▔▂▘▂▅▀▃▗▅▅▀▐▅▆  + ▗▘▊▔▘▝▅▆▔▂▃▅▀▀▀▀▀▀▝▍  + ▝▖▃▃▀▀▃▀▀▅▅▅▀▀▅▁▂▃▀  + ▆▅▀▃▂▁▁▁▂▃▀▅▔  +  +  +  +  +  +[?25h' +} +__spining_cat_frame_004() { + printf '%b' '[?25l  +  +  +  + ▁▂▂▂▁▁▁  + ▋▃▃▃▅▅▞▀▃▂▁  + ▃▆▔█▔▕▊▍▅▆▅▀▆▀  + ▊▍▖▔▔▔▂▁▝▍▁▗▐▖▃▝  + ▝▁▂▂▁▗▕▘▆▎▗▆▔▆▕  + ▆▀▃▂▁▁▂▃▁▁▁▁▘  + ▔▔▔  +  +  +  +  +[?25h' +} +__spining_cat_frame_005() { + printf '%b' '[?25l  +  +  +  + ▁▁▁▁ ▁▁  + ▀▆▆▔▔▔▔▆▆▔▀▃▂▔▆▀  + ▕▖▀▃▂▂▂▆▀▀▀▍▗▀▘▘▕▕  + ▔▀▖▆▝▔▅▅▅▘▂▘▍▁▁▗▔  + ▍▀▅▅▀▆▐▋▀▀▅▁▁  + ▕▁▃▃▂▁▁▂▁▂▀▅▔  +  +  +  +  +  +[?25h' +} +__spining_cat_frame_006() { + printf '%b' '[?25l  +  +  + ▁▁  + ▁▃▃▅▅▀▀▅▃▀▅▔▅▅▆▆▏  + ▂▔▔▅▀▃▃▔▆▀▍▐▂▘▔▀▃▔▋  + ▊▍▀▃▂▁▁▂▆▆▝▂▁▔▆▆▀▝▅▎  + ▃▁▆▆▀▃▅▀▃▂▆▔▆▅▃▀▅▗  + ▆▅▃▁▁▂▁▅▀▃▃▃▃▁▂▘  + ▔▔▆▅▅▆▆▔  +  +  +  +  +  +[?25h' +} +__spining_cat_frame_007() { + printf '%b' '[?25l  +  +  + ▁ ▁▁  + ▁▂▃▃▀▀▃▁▂▂▔▅▆▆▆▆▅▅▖  + ▃▔▔▆▆▆▃▃▅▆▆▅▃▘▂▂▂▂▂▘▋  + ▊▐▝▃▃▂▁▁▁▂▂▆▆▝▂▂▂▂▂▗▅▔  + ▕▞▁▀▃▃▃▃▀▀▀▀▅▃▂▆▔▆▊▐  + ▔▅▃▃▂▁▁▁▁▂▁▆▅▀▀▂▂▀  + ▔▆▆▆▆▔  +  +  +  +  +  +[?25h' +} +__spining_cat_frame_008() { + printf '%b' '[?25l  +  +  +  + ▗▀▀▂▃  + ▂▅▅▃▃▀▀▀▀▅▅▅▆▔▂▊▂▔▖  + ▗▘▘▗▘▐▔▂▘▂▅▀▃▗▅▅▀▐▅▆  + ▗▘▊▔▘▝▅▆▔▂▃▅▀▀▀▀▀▀▝▍  + ▝▖▃▃▀▀▃▀▀▅▅▅▀▀▅▁▂▃▀  + ▆▅▀▃▂▁▁▁▂▃▀▅▔  +  +  +  +  +  +[?25h' +} +__spining_cat_frame_009() { + printf '%b' '[?25l  +  +  +  + ▁▂▂▂▁▁▁  + ▋▃▃▃▅▅▞▀▃▂▁  + ▃▆▔█▔▕▊▍▅▆▅▀▆▀  + ▊▍▖▔▔▔▂▁▝▍▁▗▐▖▃▝  + ▝▁▂▂▁▗▕▘▆▎▗▆▔▆▕  + ▆▀▃▂▁▁▂▃▁▁▁▁▘  + ▔▔▔  +  +  +  +  +[?25h' +} +__spining_cat_frame_010() { + printf '%b' '[?25l  +  +  +  + ▁▁▁▁ ▁▁  + ▀▆▆▔▔▔▔▆▆▔▀▃▂▔▆▀  + ▕▖▀▃▂▂▂▆▀▀▀▍▗▀▘▘▕▕  + ▔▀▖▆▝▔▅▅▅▘▂▘▍▁▁▗▔  + ▍▀▅▅▀▆▐▋▀▀▅▁▁  + ▕▁▃▃▂▁▁▂▁▂▀▅▔  +  +  +  +  +  +[?25h' +} +__spining_cat_frame_011() { + printf '%b' '[?25l  +  +  + ▁▁  + ▁▃▃▅▅▀▀▅▃▀▅▔▅▅▆▆▏  + ▂▔▔▅▀▃▃▔▆▀▍▐▂▘▔▀▃▔▋  + ▊▍▀▃▂▁▁▂▆▆▝▂▁▔▆▆▀▝▅▎  + ▃▁▆▆▀▃▅▀▃▂▆▔▆▅▃▀▅▗  + ▆▅▃▁▁▂▁▅▀▃▃▃▃▁▂▘  + ▔▔▆▅▅▆▆▔  +  +  +  +  +  +[?25h' +} +__spining_cat_frame_012() { + printf '%b' '[?25l  +  +  + ▁ ▁▁  + ▁▂▃▃▀▀▃▁▂▂▔▅▆▆▆▆▅▅▖  + ▃▔▔▆▆▆▃▃▅▆▆▅▃▘▂▂▂▂▂▘▋  + ▊▐▝▃▃▂▁▁▁▂▂▆▆▝▂▂▂▂▂▗▅▔  + ▕▞▁▀▃▃▃▃▀▀▀▀▅▃▂▆▔▆▊▐  + ▔▅▃▃▂▁▁▁▁▂▁▆▅▀▀▂▂▀  + ▔▆▆▆▆▔  +  +  +  +  +  +[?25h' +} +__spining_cat_frame_013() { + printf '%b' '[?25l  +  +  +  + ▗▀▀▂▃  + ▂▅▅▃▃▀▀▀▀▅▅▅▆▔▂▊▂▔▖  + ▗▘▘▗▘▐▔▂▘▂▅▀▃▗▅▅▀▐▅▆  + ▗▘▊▔▘▝▅▆▔▂▃▅▀▀▀▀▀▀▝▍  + ▝▖▃▃▀▀▃▀▀▅▅▅▀▀▅▁▂▃▀  + ▆▅▀▃▂▁▁▁▂▃▀▅▔  +  +  +  +  +  +[?25h' +} +__spining_cat_frame_014() { + printf '%b' '[?25l  +  +  +  + ▁▂▂▂▁▁▁  + ▋▃▃▃▅▅▞▀▃▂▁  + ▃▆▔█▔▕▊▍▅▆▅▀▆▀  + ▊▍▖▔▔▔▂▁▝▍▁▗▐▖▃▝  + ▝▁▂▂▁▗▕▘▆▎▗▆▔▆▕  + ▆▀▃▂▁▁▂▃▁▁▁▁▘  + ▔▔▔  +  +  +  +  +[?25h' +} +__spining_cat_frame_015() { + printf '%b' '[?25l  +  +  +  + ▁▁▁▁ ▁▁  + ▀▆▆▔▔▔▔▆▆▔▀▃▂▔▆▀  + ▕▖▀▃▂▂▂▆▀▀▀▍▗▀▘▘▕▕  + ▔▀▖▆▝▔▅▅▅▘▂▘▍▁▁▗▔  + ▍▀▅▅▀▆▐▋▀▀▅▁▁  + ▕▁▃▃▂▁▁▂▁▂▀▅▔  +  +  +  +  +  +[?25h' +} +__spining_cat_frame_016() { + printf '%b' '[?25l  +  +  + ▁▁  + ▁▃▃▅▅▀▀▅▃▀▅▔▅▅▆▆▏  + ▂▔▔▅▀▃▃▔▆▀▍▐▂▘▔▀▃▔▋  + ▊▍▀▃▂▁▁▂▆▆▝▂▁▔▆▆▀▝▅▎  + ▃▁▆▆▀▃▅▀▃▂▆▔▆▅▃▀▅▗  + ▆▅▃▁▁▂▁▅▀▃▃▃▃▁▂▘  + ▔▔▆▅▅▆▆▔  +  +  +  +  +  +[?25h' +} diff --git a/package/migrator/migrator.sh b/package/migrator/migrator.sh index 67e80f9..6f42b25 100644 --- a/package/migrator/migrator.sh +++ b/package/migrator/migrator.sh @@ -342,6 +342,11 @@ migrate() { target_idx=$(index_of "$fs_migrations" "$target_migration") log debug "indexes $WHITE$current_idx$NC $WHITE${target_idx}" + + if [ "$target_idx" -eq "$current_idx" ]; then + log notice "database already at ${WHITE}$target_migration${NC}" + exit 0 + fi } form_psql_args() { @@ -508,8 +513,8 @@ if ! [ "${AS_LIBRARY+x}" ]; then esac done - [ ${INHERITS_LIST+x} ] && INHERITS_LIST="$(printf '%s' "$INHERITS_LIST" | sed -E 's/"/,/g; s/([^,]+)/"\1"/g')" - [ "${SUBCOMMAND+x}" ] || { log error "no subcomand specified"; exit 1; } + [ "${INHERITS_LIST+x}" ] && INHERITS_LIST="$(printf '%s' "$INHERITS_LIST" | sed -E 's/"/,/g; s/([^,]+)/"\1"/g')" + [ "${SUBCOMMAND+x}" ] || { log error "no subcomand specified"; exit 1; } log debug "subcommand: $WHITE$SUBCOMMAND" diff --git a/sus/bfs.xray.yaml b/sus/bfs.xray.yaml index 0926bc4..23a56e0 100644 --- a/sus/bfs.xray.yaml +++ b/sus/bfs.xray.yaml @@ -1,5 +1,8 @@ -config: ENC[AES256_GCM,data:IL0jhVCw2YcZW/LkOrKXYrVAzq6jC65gAzOhfD8P8DL8GKQUHY/GlzJBNw+Vnk+EO8vYdcwpjWou+lhyL9aG7HKqK4rVo8nhxVyCmcaoAPjz4gmHer0teAloI5xCtifbDzzE4VAvpxmZbMPg6d5kSV3elqIFzCBVSsM1KM7ku/0+NEm2VuJuZEsta5UqHDGAPPBqy1TkQXDtabyLfP4q4GimKBI4t7uusE0oMRB5WuSljTpW9eBd5pRrKBZZ+oFDn5Lx2GK4DpVX92VKtbEWewRpcU3/2KhSXSc+Nx+Vw0ULc1P1AMtl8v8SBbYLZZF9Ebsl2/XTRvEZO+HuZ4op2zTrLTElFBx4UKoq4tJGru6XeE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GyUtKKRnF7VLKDI3Rlkn820Xs3LrJrrpn7kBuv1/ualsRSoqdWfz+F85Q==,iv:uQ5LC8HOAj3YbG4MgeTMzK+/mAU2BIk9M7etGw+4jPA=,tag:gHofctPZ1L125DnsylBvPA==,type:str] init-postgresql: ENC[AES256_GCM,data:4RGUfJLnYd0C0rGwa11DdreQFly1bcmAv728hv4QGzRRxcrka9GkOubPZFLZCZ8icoydotOckHK7caXK3Hg=,iv:T66gCmgEn94ydApfAs6eK/5FWlzXs3QmOYUQKbhllWI=,tag:9ZcOB/e0MGjjhXWbEpKGYg==,type:str] +matrix: + secrets: ENC[AES256_GCM,data:fLct3DBfxjebuuYv4IVhGXWx/G6EjQdQNBzFSq2ek8TRfv5XzpknwNeMXBE6eeNgqJeJT9K1MAHrxeChOlkAe0U4hwP/jv3yPo+cFMn9oA7fqXIjYtquRW7oMypHMjpO4X8B1DFkCyVZ0G8p/++UASmiG5bpQcWmUGSrgvJv6WZw+UiFUj0LE2MdZ2MHRv+S3wWtsUqmUCXWGSxuJXOmoLmkYLWBiX5+AkZ8kPTzhVUC7Gq72UngQTNW69uvnoZs/EgrtLSVhRe8YnC/0qu6gRtRXO55Unk9ETv1wDi+GsF4orJgPhLXw2fObomnzgNx4Vd8w+aqCxVUFQ8kwChKe+9/eMGg6lCHqV8i3bhZpTCHObN0rXvBnT9xUm6EoNCmD8V2YZdDBdLSQCuiUW0uSvmEn5yvv1AQYBX/t7Z78YuGrEzSz008akytjdSV8s7xNzks/wPa,iv:5OsDc68VovS1Er5YI7Q7m0K8yLoadkdS7B7pDrivsLI=,tag:jy8NIXaKC6VvJgxWJaeNXg==,type:str] + turn-secret: ENC[AES256_GCM,data:mGkqhYVgjPQmGmopG4aJN+IU2v4xRyC3Ddg+YXZzVN+1AcTTx+441LZWXJZIgOL39BlFlY+43f+StHUmXoFzGg==,iv:tNQQQpxHr6K5dMAufh+cEVanqd/52YURDy2g9fpP+vE=,tag:SEJ0QDXPr8N8tPxQUALJ1A==,type:str] sops: age: - recipient: age1w4hw2ntxrtfqhht63s9lf7nhjxjmdcc927hndn5ygcqqj532qssq4m2m6p @@ -29,7 +32,7 @@ sops: dFh2anpQTTBpVDdCd3hIYmJLMmpVM0kKvuWuryBpHTpsn9eq6MosafVH0m2KTmql xzxUibPr2BmeR4QAB+pYLqTBH1+N9atGYdLe5qe7GqEmcjq8IfJnBw== -----END AGE ENCRYPTED FILE----- - lastmodified: "2025-12-05T15:21:27Z" - mac: ENC[AES256_GCM,data:7VvtCv2InOrlYO63IZatZWqDSCgxNILktNbGdg0RtAbyByXB+Ct2ab/Lb3N+uV33KUnBx8n9H8U4r2u6vPJT7yj+b/QcdyAmc21jqhe6IQmMQB6sLKLde82hz3NhdFLarFrFioiqkKYJQkmO1qPfNJXhFbdD8MA3ELCwqBGLNoE=,iv:13TDmpH7GB5nOjpXI42ccbPnO67cjEFTkq1hj2KL9AI=,tag:1hSIsbDOdp7T7kj+yB+2lw==,type:str] + lastmodified: "2025-12-06T20:25:29Z" + mac: ENC[AES256_GCM,data:YDY+yZ7lIrchL8DVjezJKrRRjcrUQq6KNlIDiutxwvUdeMo0rKycbuvj8ZtLfzTXBnatx2ZyadHvXKxbQj3KWIjSDzAeAkOCy0TmiytFp8H038e63/4jSq792/1ZoJfsseTAaRauYwp8rXyXuKHEv6KlYudfUyr2m4mdyUpOC/o=,iv:lYBPBCaJJZw5xrqNdXL2WwxEdb/IjXuZQ665LSMySs8=,tag:JJbc57Ce2xwGST8gDOv9HQ==,type:str] unencrypted_suffix: _unencrypted version: 3.10.2