From 428fcab00946cbc5a97d648f05b3c979c5752cd9 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 6 Nov 2023 22:34:51 +0100 Subject: [PATCH 1/3] fix: store forgejo sessions in DB See: https://docs.gitea.com/administration/config-cheat-sheet#session-session --- hosts/nachtigall/apps/forgejo.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/hosts/nachtigall/apps/forgejo.nix b/hosts/nachtigall/apps/forgejo.nix index 5adb700..9bbb045 100644 --- a/hosts/nachtigall/apps/forgejo.nix +++ b/hosts/nachtigall/apps/forgejo.nix @@ -76,6 +76,7 @@ DEFAULT_KEEP_EMAIL_PRIVATE = true; }; session = { + PROVIDER = "db"; COOKIE_SECURE = lib.mkForce true; }; # See https://forgejo.org/docs/latest/admin/actions/ From 07df547f335de356b3825f4c76abe9a900debe5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Mon, 6 Nov 2023 22:37:40 +0100 Subject: [PATCH 2/3] fix: specify sftp storage for droppie restic backups --- hosts/nachtigall/apps/forgejo.nix | 2 +- hosts/nachtigall/apps/keycloak.nix | 2 +- hosts/nachtigall/apps/mailman.nix | 2 +- hosts/nachtigall/apps/mastodon.nix | 2 +- hosts/nachtigall/apps/nextcloud.nix | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hosts/nachtigall/apps/forgejo.nix b/hosts/nachtigall/apps/forgejo.nix index 9bbb045..58684e4 100644 --- a/hosts/nachtigall/apps/forgejo.nix +++ b/hosts/nachtigall/apps/forgejo.nix @@ -121,7 +121,7 @@ }; initialize = true; passwordFile = config.age.secrets."restic-repo-droppie".path; - repository = "yule@droppie.b12f.io:/media/internal/backups-pub-solar"; + repository = "sftp:yule@droppie.b12f.io:/media/internal/backups-pub-solar"; backupPrepareCommand = '' ${pkgs.sudo}/bin/sudo -u postgres ${pkgs.postgresql}/bin/pg_dump -d gitea > /tmp/forgejo-backup.sql ''; diff --git a/hosts/nachtigall/apps/keycloak.nix b/hosts/nachtigall/apps/keycloak.nix index 8ca5e43..92dbd95 100644 --- a/hosts/nachtigall/apps/keycloak.nix +++ b/hosts/nachtigall/apps/keycloak.nix @@ -58,7 +58,7 @@ }; initialize = true; passwordFile = config.age.secrets."restic-repo-droppie".path; - repository = "yule@droppie.b12f.io:/media/internal/backups-pub-solar"; + repository = "sftp:yule@droppie.b12f.io:/media/internal/backups-pub-solar"; backupPrepareCommand = '' ${pkgs.sudo}/bin/sudo -u postgres ${pkgs.postgresql}/bin/pg_dump -d keycloak > /tmp/keycloak-backup.sql ''; diff --git a/hosts/nachtigall/apps/mailman.nix b/hosts/nachtigall/apps/mailman.nix index 55e49b5..58ccc53 100644 --- a/hosts/nachtigall/apps/mailman.nix +++ b/hosts/nachtigall/apps/mailman.nix @@ -94,6 +94,6 @@ }; initialize = true; passwordFile = config.age.secrets."restic-repo-droppie".path; - repository = "yule@droppie.b12f.io:/media/internal/backups-pub-solar"; + repository = "sftp:yule@droppie.b12f.io:/media/internal/backups-pub-solar"; }; } diff --git a/hosts/nachtigall/apps/mastodon.nix b/hosts/nachtigall/apps/mastodon.nix index 5570585..eb928a5 100644 --- a/hosts/nachtigall/apps/mastodon.nix +++ b/hosts/nachtigall/apps/mastodon.nix @@ -105,7 +105,7 @@ }; initialize = true; passwordFile = config.age.secrets."restic-repo-droppie".path; - repository = "yule@droppie.b12f.io:/media/internal/backups-pub-solar"; + repository = "sftp:yule@droppie.b12f.io:/media/internal/backups-pub-solar"; backupPrepareCommand = '' ${pkgs.sudo}/bin/sudo -u postgres ${pkgs.postgresql}/bin/pg_dump -d mastodon > /tmp/mastodon-backup.sql ''; diff --git a/hosts/nachtigall/apps/nextcloud.nix b/hosts/nachtigall/apps/nextcloud.nix index 50f086b..2c5472e 100644 --- a/hosts/nachtigall/apps/nextcloud.nix +++ b/hosts/nachtigall/apps/nextcloud.nix @@ -143,7 +143,7 @@ }; initialize = true; passwordFile = config.age.secrets."restic-repo-droppie".path; - repository = "yule@droppie.b12f.io:/media/internal/backups-pub-solar"; + repository = "sftp:yule@droppie.b12f.io:/media/internal/backups-pub-solar"; backupPrepareCommand = '' ${pkgs.sudo}/bin/sudo -u postgres ${pkgs.postgresql}/bin/pg_dump -d nextcloud > /tmp/nextcloud-backup.sql ''; From d69e0350efd26e6bd8eaa2deb62df5d3ca956c89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Mon, 6 Nov 2023 22:58:48 +0100 Subject: [PATCH 3/3] fix: use clean new directory for backups on droppie --- hosts/nachtigall/apps/forgejo.nix | 2 +- hosts/nachtigall/apps/keycloak.nix | 2 +- hosts/nachtigall/apps/mailman.nix | 2 +- hosts/nachtigall/apps/mastodon.nix | 2 +- hosts/nachtigall/apps/nextcloud.nix | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hosts/nachtigall/apps/forgejo.nix b/hosts/nachtigall/apps/forgejo.nix index 58684e4..03255af 100644 --- a/hosts/nachtigall/apps/forgejo.nix +++ b/hosts/nachtigall/apps/forgejo.nix @@ -121,7 +121,7 @@ }; initialize = true; passwordFile = config.age.secrets."restic-repo-droppie".path; - repository = "sftp:yule@droppie.b12f.io:/media/internal/backups-pub-solar"; + repository = "sftp:yule@droppie.b12f.io:/media/internal/pub.solar"; backupPrepareCommand = '' ${pkgs.sudo}/bin/sudo -u postgres ${pkgs.postgresql}/bin/pg_dump -d gitea > /tmp/forgejo-backup.sql ''; diff --git a/hosts/nachtigall/apps/keycloak.nix b/hosts/nachtigall/apps/keycloak.nix index 92dbd95..5f28310 100644 --- a/hosts/nachtigall/apps/keycloak.nix +++ b/hosts/nachtigall/apps/keycloak.nix @@ -58,7 +58,7 @@ }; initialize = true; passwordFile = config.age.secrets."restic-repo-droppie".path; - repository = "sftp:yule@droppie.b12f.io:/media/internal/backups-pub-solar"; + repository = "sftp:yule@droppie.b12f.io:/media/internal/pub.solar"; backupPrepareCommand = '' ${pkgs.sudo}/bin/sudo -u postgres ${pkgs.postgresql}/bin/pg_dump -d keycloak > /tmp/keycloak-backup.sql ''; diff --git a/hosts/nachtigall/apps/mailman.nix b/hosts/nachtigall/apps/mailman.nix index 58ccc53..fb48da8 100644 --- a/hosts/nachtigall/apps/mailman.nix +++ b/hosts/nachtigall/apps/mailman.nix @@ -94,6 +94,6 @@ }; initialize = true; passwordFile = config.age.secrets."restic-repo-droppie".path; - repository = "sftp:yule@droppie.b12f.io:/media/internal/backups-pub-solar"; + repository = "sftp:yule@droppie.b12f.io:/media/internal/pub.solar"; }; } diff --git a/hosts/nachtigall/apps/mastodon.nix b/hosts/nachtigall/apps/mastodon.nix index eb928a5..0dbdc47 100644 --- a/hosts/nachtigall/apps/mastodon.nix +++ b/hosts/nachtigall/apps/mastodon.nix @@ -105,7 +105,7 @@ }; initialize = true; passwordFile = config.age.secrets."restic-repo-droppie".path; - repository = "sftp:yule@droppie.b12f.io:/media/internal/backups-pub-solar"; + repository = "sftp:yule@droppie.b12f.io:/media/internal/pub.solar"; backupPrepareCommand = '' ${pkgs.sudo}/bin/sudo -u postgres ${pkgs.postgresql}/bin/pg_dump -d mastodon > /tmp/mastodon-backup.sql ''; diff --git a/hosts/nachtigall/apps/nextcloud.nix b/hosts/nachtigall/apps/nextcloud.nix index 2c5472e..4741476 100644 --- a/hosts/nachtigall/apps/nextcloud.nix +++ b/hosts/nachtigall/apps/nextcloud.nix @@ -143,7 +143,7 @@ }; initialize = true; passwordFile = config.age.secrets."restic-repo-droppie".path; - repository = "sftp:yule@droppie.b12f.io:/media/internal/backups-pub-solar"; + repository = "sftp:yule@droppie.b12f.io:/media/internal/pub.solar"; backupPrepareCommand = '' ${pkgs.sudo}/bin/sudo -u postgres ${pkgs.postgresql}/bin/pg_dump -d nextcloud > /tmp/nextcloud-backup.sql '';