From 08e8d6bf69eda8a7bc3a87f9444e17a9a1feaf8c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Apr 2026 16:50:58 +0000 Subject: [PATCH] Remove legacy file_fixes_and_new_services system Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/ae9f019a-3743-48b8-b251-feb17b1adbd4 Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com> --- ...n_SystemsOS_File_Fixes_And_New_Services.sh | 70 ------------- file_fixes_and_new_services/add-custom-nix.sh | 86 ---------------- .../add_external_backup_app.sh | 66 ------------- .../element-calling_haven.sh | 65 ------------ .../nextcloud_maintenance_window_fix.sh | 62 ------------ .../sovran-pro-flake-update.sh | 96 ------------------ .../sovran-pro-flake-update2.sh | 98 ------------------- file_fixes_and_new_services/update-agenix.sh | 83 ---------------- ..._SystemsOS_File_Fixes_And_New_Services.nix | 24 ----- modules/modules.nix | 1 - 10 files changed, 651 deletions(-) delete mode 100755 file_fixes_and_new_services/Sovran_SystemsOS_File_Fixes_And_New_Services.sh delete mode 100755 file_fixes_and_new_services/add-custom-nix.sh delete mode 100755 file_fixes_and_new_services/add_external_backup_app.sh delete mode 100644 file_fixes_and_new_services/element-calling_haven.sh delete mode 100755 file_fixes_and_new_services/nextcloud_maintenance_window_fix.sh delete mode 100755 file_fixes_and_new_services/sovran-pro-flake-update.sh delete mode 100755 file_fixes_and_new_services/sovran-pro-flake-update2.sh delete mode 100755 file_fixes_and_new_services/update-agenix.sh delete mode 100755 modules/Sovran_SystemsOS_File_Fixes_And_New_Services.nix diff --git a/file_fixes_and_new_services/Sovran_SystemsOS_File_Fixes_And_New_Services.sh b/file_fixes_and_new_services/Sovran_SystemsOS_File_Fixes_And_New_Services.sh deleted file mode 100755 index 538aa4f..0000000 --- a/file_fixes_and_new_services/Sovran_SystemsOS_File_Fixes_And_New_Services.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/env bash - -cd /home/free/Downloads - - -#### SCRIPT 1 #### - -/run/current-system/sw/bin/wget "https://git.sovransystems.com/Sovran_Systems/Sovran_SystemsOS/raw/branch/main/file_fixes_and_new_services/sovran-pro-flake-update.sh" - -/run/current-system/sw/bin/bash /home/free/Downloads/sovran-pro-flake-update.sh - -rm -rf /home/free/Downloads/sovran-pro-flake-update.sh - - -#### SCRIPT 2 #### - -/run/current-system/sw/bin/wget "https://git.sovransystems.com/Sovran_Systems/Sovran_SystemsOS/raw/branch/main/file_fixes_and_new_services/add-custom-nix.sh" - -/run/current-system/sw/bin/bash /home/free/Downloads/add-custom-nix.sh - -rm -rf /home/free/Downloads/add-custom-nix.sh - - -#### SCRIPT 3 #### - -/run/current-system/sw/bin/wget "https://git.sovransystems.com/Sovran_Systems/Sovran_SystemsOS/raw/branch/main/file_fixes_and_new_services/sovran-pro-flake-update2.sh" - -/run/current-system/sw/bin/bash /home/free/Downloads/sovran-pro-flake-update2.sh - -rm -rf /home/free/Downloads/sovran-pro-flake-update2.sh - - -#### SCRIPT 4 #### - -/run/current-system/sw/bin/wget "https://git.sovransystems.com/Sovran_Systems/Sovran_SystemsOS/raw/branch/main/file_fixes_and_new_services/nextcloud_maintenance_window_fix.sh" - -/run/current-system/sw/bin/bash /home/free/Downloads/nextcloud_maintenance_window_fix.sh - -rm -rf /home/free/Downloads/nextcloud_maintenance_window_fix.sh - - -#### SCRIPT 5 #### - -/run/current-system/sw/bin/wget "https://git.sovransystems.com/Sovran_Systems/Sovran_SystemsOS/raw/branch/main/file_fixes_and_new_services/add_external_backup_app.sh" - -/run/current-system/sw/bin/bash /home/free/Downloads/add_external_backup_app.sh - -rm -rf /home/free/Downloads/add_external_backup_app.sh - - -#### SCRIPT 6 #### - -/run/current-system/sw/bin/wget "https://git.sovransystems.com/Sovran_Systems/Sovran_SystemsOS/raw/branch/main/file_fixes_and_new_services/update-agenix.sh" - -/run/current-system/sw/bin/bash /home/free/Downloads/update-agenix.sh - -rm -rf /home/free/Downloads/update-agenix.sh - -#### SCRIPT 7 #### - -/run/current-system/sw/bin/wget "https://git.sovransystems.com/Sovran_Systems/Sovran_SystemsOS/raw/branch/main/file_fixes_and_new_services/element-calling_haven" - -/run/current-system/sw/bin/bash /home/free/Downloads/element-calling_haven.sh - -rm -rf /home/free/Downloads/element-calling_haven.sh - - -#### REMOVAL OF MAIN SCRIPT #### - -rm -rf /home/free/Downloads/Sovran_SystemsOS_File_Fixes_And_New_Services.sh diff --git a/file_fixes_and_new_services/add-custom-nix.sh b/file_fixes_and_new_services/add-custom-nix.sh deleted file mode 100755 index fb92a04..0000000 --- a/file_fixes_and_new_services/add-custom-nix.sh +++ /dev/null @@ -1,86 +0,0 @@ -#!/usr/bin/env bash - -function log_console () { - echo "`date` :: $1" >> /var/lib/beacons/awesome.log - echo $1 -} - - -#### CHECK TO SEE IF IT HAS BEEN RUN BEFORE #### - -FILE=/var/lib/beacons/file_fixes_and_new_services/add-custom-nix/completed - - if [ -e $FILE ]; then - - /run/current-system/sw/bin/echo "File Found :), No Need to Run ... Exiting" - - exit 1 - - fi - - -#### CREATE INITIAL TAG #### - -/run/current-system/sw/bin/mkdir -p /var/lib/beacons/file_fixes_and_new_services/add-custom-nix ; touch /var/lib/beacons/file_fixes_and_new_services/add-custom-nix/started - - if [[ $? != 0 ]]; then - - /run/current-system/sw/bin/echo "Could Not Create Initial Tag" - - exit 1 - - fi - - -#### MAIN SCRIPT #### - -touch /etc/nixos/custom.nix - -/run/current-system/sw/bin/cat > /etc/nixos/custom.nix <<- "EOF" -{ config, lib, ... }: - -{ - ########################################################### - # # - # Sovran_SystemsOS — custom.nix # - # # - # Services, features, and roles are managed by the # - # Sovran Hub. Any changes you make through the Hub # - # will appear in the "Hub Managed" section below. # - # # - # If you want to add your own NixOS modules or # - # configuration, place them here — outside of the # - # Hub Managed section. # - # # - ########################################################### - - # ─── Add your custom NixOS configuration below ─────────── - -} -EOF - - - if [[ $? != 0 ]]; then - - /run/current-system/sw/bin/echo "Could Not Run add-custom-nix" - - exit 1 - - fi - - - -#### CREATE COMPELETE TAG #### - -/run/current-system/sw/bin/touch /var/lib/beacons/file_fixes_and_new_services/add-custom-nix/completed - - if [[ $? != 0 ]]; then - - /run/current-system/sw/bin/echo "Could Not Create Completed Tag" - - exit 1 - - fi - - -exit 0 \ No newline at end of file diff --git a/file_fixes_and_new_services/add_external_backup_app.sh b/file_fixes_and_new_services/add_external_backup_app.sh deleted file mode 100755 index 877505a..0000000 --- a/file_fixes_and_new_services/add_external_backup_app.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/env bash - -function log_console () { - echo "`date` :: $1" >> /var/lib/beacons/awesome.log - echo $1 -} - - -#### CHECK TO SEE IF IT HAS BEEN RUN BEFORE #### - -FILE=/var/lib/beacons/file_fixes_and_new_services/add_external_backup_app/completed - - if [ -e $FILE ]; then - - /run/current-system/sw/bin/echo "File Found :), No Need to Run ... Exiting" - - exit 1 - - fi - - -#### CREATE INITIAL TAG #### - -/run/current-system/sw/bin/mkdir -p /var/lib/beacons/file_fixes_and_new_services/add_external_backup_app ; touch /var/lib/beacons/file_fixes_and_new_services/add_external_backup_app/started - - if [[ $? != 0 ]]; then - - /run/current-system/sw/bin/echo "Could Not Create Initial Tag" - - exit 1 - - fi - - -#### MAIN SCRIPT #### - -cd /home/free/Downloads - -/run/current-system/sw/bin/wget "https://git.sovransystems.com/Sovran_Systems/Software/raw/branch/main/Sovran_SystemsOS_External_Backup/sovran_systemsOS_external_backup_local_installer/sovran_systemsOS_external_backup_install.sh" - -/run/current-system/sw/bin/bash "sovran_systemsOS_external_backup_install.sh" - - if [[ $? != 0 ]]; then - - /run/current-system/sw/bin/echo "Could Not Run add_external_backup_app" - - exit 1 - - fi - - - -#### CREATE COMPELETE TAG #### - -/run/current-system/sw/bin/touch /var/lib/beacons/file_fixes_and_new_services/add_external_backup_app/completed - - if [[ $? != 0 ]]; then - - /run/current-system/sw/bin/echo "Could Not Create Completed Tag" - - exit 1 - - fi - - -exit 0 \ No newline at end of file diff --git a/file_fixes_and_new_services/element-calling_haven.sh b/file_fixes_and_new_services/element-calling_haven.sh deleted file mode 100644 index bacfb57..0000000 --- a/file_fixes_and_new_services/element-calling_haven.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/env bash - -function log_console () { - echo "`date` :: $1" >> /var/lib/beacons/awesome.log - echo $1 -} - - -#### CHECK TO SEE IF IT HAS BEEN RUN BEFORE #### - -FILE=/var/lib/beacons/file_fixes_and_new_services/element-calling_haven/completed - - if [ -e $FILE ]; then - - /run/current-system/sw/bin/echo "File Found :), No Need to Run ... Exiting" - - exit 1 - - fi - - -#### CREATE INITIAL TAG #### - -/run/current-system/sw/bin/mkdir -p /var/lib/beacons/file_fixes_and_new_services/element-calling_haven ; touch /var/lib/beacons/file_fixes_and_new_services/element-calling_haven/started - - if [[ $? != 0 ]]; then - - /run/current-system/sw/bin/echo "Could Not Create Initial Tag" - - exit 1 - - fi - - -#### MAIN SCRIPT #### - - mkdir -p /var/lib/domains - touch /var/lib/domains/haven - touch /var/lib/domains/element-calling - chown -R caddy:root /var/lib/domains - - if [[ $? != 0 ]]; then - - /run/current-system/sw/bin/echo "Could Not Run element-calling_haven" - - exit 1 - - fi - - - -#### CREATE COMPELETE TAG #### - -/run/current-system/sw/bin/touch /var/lib/beacons/file_fixes_and_new_services/element-calling_haven/completed - - if [[ $? != 0 ]]; then - - /run/current-system/sw/bin/echo "Could Not Create Completed Tag" - - exit 1 - - fi - - -exit 0 diff --git a/file_fixes_and_new_services/nextcloud_maintenance_window_fix.sh b/file_fixes_and_new_services/nextcloud_maintenance_window_fix.sh deleted file mode 100755 index 28be712..0000000 --- a/file_fixes_and_new_services/nextcloud_maintenance_window_fix.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env bash - -function log_console () { - echo "`date` :: $1" >> /var/lib/beacons/awesome.log - echo $1 -} - - -#### CHECK TO SEE IF IT HAS BEEN RUN BEFORE #### - -FILE=/var/lib/beacons/file_fixes_and_new_services/nextcloud_maintenance_window_fix/completed - - if [ -e $FILE ]; then - - /run/current-system/sw/bin/echo "File Found :), No Need to Run ... Exiting" - - exit 1 - - fi - - -#### CREATE INITIAL TAG #### - -/run/current-system/sw/bin/mkdir -p /var/lib/beacons/file_fixes_and_new_services/nextcloud_maintenance_window_fix ; touch /var/lib/beacons/file_fixes_and_new_services/nextcloud_maintenance_window_fix/started - - if [[ $? != 0 ]]; then - - /run/current-system/sw/bin/echo "Could Not Create Initial Tag" - - exit 1 - - fi - - -#### MAIN SCRIPT #### - -/run/wrappers/bin/sudo -u caddy /run/current-system/sw/bin/php /var/lib/www/nextcloud/occ config:system:set maintenance_window_start --type=integer --value=1 - - if [[ $? != 0 ]]; then - - /run/current-system/sw/bin/echo "Could Not Run add-custom-nix" - - exit 1 - - fi - - - -#### CREATE COMPELETE TAG #### - -/run/current-system/sw/bin/touch /var/lib/beacons/file_fixes_and_new_services/nextcloud_maintenance_window_fix/completed - - if [[ $? != 0 ]]; then - - /run/current-system/sw/bin/echo "Could Not Create Completed Tag" - - exit 1 - - fi - - -exit 0 \ No newline at end of file diff --git a/file_fixes_and_new_services/sovran-pro-flake-update.sh b/file_fixes_and_new_services/sovran-pro-flake-update.sh deleted file mode 100755 index 4deaa01..0000000 --- a/file_fixes_and_new_services/sovran-pro-flake-update.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/env bash - -function log_console () { - echo "`date` :: $1" >> /var/lib/beacons/awesome.log - echo $1 -} - - -#### CHECK TO SEE IF IT HAS BEEN RUN BEFORE #### - -FILE=/var/lib/beacons/file_fixes_and_new_services/sovran-pro-flake-update/completed - - if [ -e $FILE ]; then - - /run/current-system/sw/bin/echo "File Found :), No Need to Run ... Exiting" - - exit 1 - - fi - - -#### CREATE INITIAL TAG #### - -/run/current-system/sw/bin/mkdir -p /var/lib/beacons/file_fixes_and_new_services/sovran-pro-flake-update ; touch /var/lib/beacons/file_fixes_and_new_services/sovran-pro-flake-update/started - - if [[ $? != 0 ]]; then - - /run/current-system/sw/bin/echo "Could Not Create Initial Tag" - - exit 1 - - fi - - -#### MAIN SCRIPT #### - -/run/current-system/sw/bin/rm /etc/nixos/flake.nix - -/run/current-system/sw/bin/cat > /etc/nixos/flake.nix <<- "EOF" - -{ - description = "Sovran_SystemsOS for the Sovran Pro from Sovran Systems"; - - inputs = { - - Sovran_Systems.url = "git+https://git.sovransystems.com/Sovran_Systems/Sovran_SystemsOS"; - - }; - - outputs = { self, Sovran_Systems, ... }@inputs: { - - nixosConfigurations."nixos" = Sovran_Systems.inputs.nixpkgs.lib.nixosSystem { - - system = "x86_64-linux"; - - modules = [ - - ./hardware-configuration.nix - - Sovran_Systems.nixosModules.Sovran_SystemsOS - - ]; - - }; - - }; - -} - -EOF - - - if [[ $? != 0 ]]; then - - /run/current-system/sw/bin/echo "Could Not Run sovran-pro-flake-update" - - exit 1 - - fi - - - -#### CREATE COMPELETE TAG #### - -/run/current-system/sw/bin/touch /var/lib/beacons/file_fixes_and_new_services/sovran-pro-flake-update/completed - - if [[ $? != 0 ]]; then - - /run/current-system/sw/bin/echo "Could Not Create Completed Tag" - - exit 1 - - fi - - -exit 0 \ No newline at end of file diff --git a/file_fixes_and_new_services/sovran-pro-flake-update2.sh b/file_fixes_and_new_services/sovran-pro-flake-update2.sh deleted file mode 100755 index a594503..0000000 --- a/file_fixes_and_new_services/sovran-pro-flake-update2.sh +++ /dev/null @@ -1,98 +0,0 @@ -#!/usr/bin/env bash - -function log_console () { - echo "`date` :: $1" >> /var/lib/beacons/awesome.log - echo $1 -} - - -#### CHECK TO SEE IF IT HAS BEEN RUN BEFORE #### - -FILE=/var/lib/beacons/file_fixes_and_new_services/sovran-pro-flake-update2/completed - - if [ -e $FILE ]; then - - /run/current-system/sw/bin/echo "File Found :), No Need to Run ... Exiting" - - exit 1 - - fi - - -#### CREATE INITIAL TAG #### - -/run/current-system/sw/bin/mkdir -p /var/lib/beacons/file_fixes_and_new_services/sovran-pro-flake-update2 ; touch /var/lib/beacons/file_fixes_and_new_services/sovran-pro-flake-update2/started - - if [[ $? != 0 ]]; then - - /run/current-system/sw/bin/echo "Could Not Create Initial Tag" - - exit 1 - - fi - - -#### MAIN SCRIPT #### - -/run/current-system/sw/bin/rm /etc/nixos/flake.nix - -/run/current-system/sw/bin/cat > /etc/nixos/flake.nix <<- "EOF" - -{ - description = "Sovran_SystemsOS for the Sovran Pro from Sovran Systems"; - - inputs = { - - Sovran_Systems.url = "git+https://git.sovransystems.com/Sovran_Systems/Sovran_SystemsOS"; - - }; - - outputs = { self, Sovran_Systems, ... }@inputs: { - - nixosConfigurations."nixos" = Sovran_Systems.inputs.nixpkgs.lib.nixosSystem { - - system = "x86_64-linux"; - - modules = [ - - ./custom.nix - - ./hardware-configuration.nix - - Sovran_Systems.nixosModules.Sovran_SystemsOS - - ]; - - }; - - }; - -} - -EOF - - - if [[ $? != 0 ]]; then - - /run/current-system/sw/bin/echo "Could Not Run sovran-pro-flake-update2" - - exit 1 - - fi - - - -#### CREATE COMPELETE TAG #### - -/run/current-system/sw/bin/touch /var/lib/beacons/file_fixes_and_new_services/sovran-pro-flake-update2/completed - - if [[ $? != 0 ]]; then - - /run/current-system/sw/bin/echo "Could Not Create Completed Tag" - - exit 1 - - fi - - -exit 0 \ No newline at end of file diff --git a/file_fixes_and_new_services/update-agenix.sh b/file_fixes_and_new_services/update-agenix.sh deleted file mode 100755 index 3e73666..0000000 --- a/file_fixes_and_new_services/update-agenix.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/env bash - -#### CHECK TO SEE IF IT HAS BEEN RUN BEFORE #### - -FILE=/var/lib/beacons/file_fixes_and_new_services/update-agenix/completed - - if [ -e $FILE ]; then - - /run/current-system/sw/bin/echo "File Found :), No Need to Run ... Exiting" - - exit 1 - - fi - - -#### CREATE INITIAL TAG #### - -/run/current-system/sw/bin/mkdir -p /var/lib/beacons/file_fixes_and_new_services/update-agenix ; touch /var/lib/beacons/file_fixes_and_new_services/update-agenix/started - - if [[ $? != 0 ]]; then - - /run/current-system/sw/bin/echo "Could Not Create Initial Tag" - - exit 1 - - fi - - -#### MAIN SCRIPT #### - -/run/current-system/sw/bin/rm -rf /var/lib/agenix-secrets/nextclouddb.age - -/run/current-system/sw/bin/rm -rf /var/lib/agenix-secrets/wordpressdb.age - -/run/current-system/sw/bin/rm -rf /var/lib/agenix-secrets/turn.age - -/run/current-system/sw/bin/rm -rf /var/lib/agenix-secrets/matrixdb.age - -/run/current-system/sw/bin/rm -rf /var/lib/agenix-secrets/matrix_reg_secret.age - - -pushd /var/lib/agenix-secrets/ - - - /run/current-system/sw/bin/echo -n $(/run/current-system/sw/bin/cat /var/lib/secrets/wordpressdb) | EDITOR='/run/current-system/sw/bin/cp /dev/stdin' /run/current-system/sw/bin/nix run github:ryantm/agenix -- -e wordpressdb.age -i /root/.ssh/agenix/agenix-secret-keys - - /run/current-system/sw/bin/echo -n $(/run/current-system/sw/bin/cat /var/lib/secrets/nextclouddb) | EDITOR='/run/current-system/sw/bin/cp /dev/stdin' /run/current-system/sw/bin/nix run github:ryantm/agenix -- -e nextclouddb.age -i /root/.ssh/agenix/agenix-secret-keys - - /run/current-system/sw/bin/echo -n $(/run/current-system/sw/bin/cat /var/lib/secrets/matrixdb) | EDITOR='/run/current-system/sw/bin/cp /dev/stdin' /run/current-system/sw/bin/nix run github:ryantm/agenix -- -e matrixdb.age -i /root/.ssh/agenix/agenix-secret-keys - - /run/current-system/sw/bin/echo -n $(/run/current-system/sw/bin/cat /var/lib/secrets/turn) | EDITOR='/run/current-system/sw/bin/cp /dev/stdin' /run/current-system/sw/bin/nix run github:ryantm/agenix -- -e turn.age -i /root/.ssh/agenix/agenix-secret-keys - - /run/current-system/sw/bin/echo -n $(/run/current-system/sw/bin/cat /var/lib/secrets/matrix_reg_secret) | EDITOR='/run/current-system/sw/bin/cp /dev/stdin' /run/current-system/sw/bin/nix run github:ryantm/agenix -- -e matrix_reg_secret.age -i /root/.ssh/agenix/agenix-secret-keys - - -popd - - - if [[ $? != 0 ]]; then - - /run/current-system/sw/bin/echo "Could Not Run update-agenix" - - exit 1 - - fi - - - -#### CREATE COMPELETE TAG #### - -/run/current-system/sw/bin/touch /var/lib/beacons/file_fixes_and_new_services/update-agenix/completed - - if [[ $? != 0 ]]; then - - /run/current-system/sw/bin/echo "Could Not Create Completed Tag" - - exit 1 - - fi - - -exit 0 - diff --git a/modules/Sovran_SystemsOS_File_Fixes_And_New_Services.nix b/modules/Sovran_SystemsOS_File_Fixes_And_New_Services.nix deleted file mode 100755 index 5d766e1..0000000 --- a/modules/Sovran_SystemsOS_File_Fixes_And_New_Services.nix +++ /dev/null @@ -1,24 +0,0 @@ -{config, pkgs, lib, ...}: - -{ - - systemd.services.Sovran_SystemsOS_File_Fixes_And_New_Services = { - - unitConfig = { - After = "btcpayserver.service"; - Requires = "network-online.target"; - }; - - serviceConfig = { - ExecStartPre= "/run/current-system/sw/bin/sleep 30"; - ExecStart = "/run/current-system/sw/bin/wget https://git.sovransystems.com/Sovran_Systems/Sovran_SystemsOS/raw/branch/main/file_fixes_and_new_services/Sovran_SystemsOS_File_Fixes_And_New_Services.sh -O /home/free/Downloads/Sovran_SystemsOS_File_Fixes_And_New_Services.sh ; /run/current-system/sw/bin/bash /home/free/Downloads/Sovran_SystemsOS_File_Fixes_And_New_Services.sh"; - RemainAfterExit = "yes"; - User = "root"; - Type = "oneshot"; - }; - - wantedBy = [ "multi-user.target" ]; - - }; - -} diff --git a/modules/modules.nix b/modules/modules.nix index 4d20fb0..5a3ceac 100755 --- a/modules/modules.nix +++ b/modules/modules.nix @@ -16,7 +16,6 @@ # ── Always on (no flag) ─────────────────────────────────── ./php.nix - ./Sovran_SystemsOS_File_Fixes_And_New_Services.nix ./credentials.nix # ── Services (default ON — disable in custom.nix) ─────────