Skip to content
Snippets Groups Projects
Commit 692b3ae9 authored by Florian Sesser's avatar Florian Sesser
Browse files

Revert "Back up a whole grid into one repository. Have much fewer configuration."

parent c8a13555
No related branches found
No related tags found
5 merge requests!315update production,!314update production,!313update production,!312update production,!297Borgbackup
Pipeline #2037 passed
Showing
with 14 additions and 15 deletions
...@@ -11,5 +11,4 @@ ...@@ -11,5 +11,4 @@
"http://localhost:5000" "http://localhost:5000"
] ]
, "monitoringGoogleOAuthClientID": "" , "monitoringGoogleOAuthClientID": ""
, "borgBackupRepoPath": "vjs989hy@vjs989hy.repo.borgbase.com:repo"
} }
...@@ -57,7 +57,7 @@ let ...@@ -57,7 +57,7 @@ let
grid = { grid = {
publicKeyPath = toString ./. + "/${grid-config.publicKeyPath}"; publicKeyPath = toString ./. + "/${grid-config.publicKeyPath}";
privateKeyPath = toString ./. + "/${grid-config.privateKeyPath}"; privateKeyPath = toString ./. + "/${grid-config.privateKeyPath}";
inherit (grid-config) monitoringvpnEndpoint letsEncryptAdminEmail borgBackupRepoPath; inherit (grid-config) monitoringvpnEndpoint letsEncryptAdminEmail;
}; };
# Configure deployment management authorization for all systems in the grid. # Configure deployment management authorization for all systems in the grid.
services.private-storage.deployment = { services.private-storage.deployment = {
......
vjs989hy@vjs989hy.repo.borgbase.com:repo
storage1.repopath
\ No newline at end of file
...@@ -17,5 +17,4 @@ ...@@ -17,5 +17,4 @@
"https://private.storage" "https://private.storage"
] ]
, "monitoringGoogleOAuthClientID": "802959152038-klpkk38sfnqmknn1ucg7pvs4hcc2k8ae.apps.googleusercontent.com" , "monitoringGoogleOAuthClientID": "802959152038-klpkk38sfnqmknn1ucg7pvs4hcc2k8ae.apps.googleusercontent.com"
, "borgBackupRepoPath": "still-to@fill-in.repo.borgbase.com:repo"
} }
...@@ -19,7 +19,7 @@ let ...@@ -19,7 +19,7 @@ let
grid = { grid = {
publicKeyPath = toString ./. + "/${grid-config.publicKeyPath}"; publicKeyPath = toString ./. + "/${grid-config.publicKeyPath}";
privateKeyPath = toString ./. + "/${grid-config.privateKeyPath}"; privateKeyPath = toString ./. + "/${grid-config.privateKeyPath}";
inherit (grid-config) monitoringvpnEndpoint letsEncryptAdminEmail borgBackupRepoPath; inherit (grid-config) monitoringvpnEndpoint letsEncryptAdminEmail;
}; };
# Configure deployment management authorization for all systems in the grid. # Configure deployment management authorization for all systems in the grid.
services.private-storage.deployment = { services.private-storage.deployment = {
......
tqxc4i79@tqxc4i79.repo.borgbase.com:repo
storage001.repopath
\ No newline at end of file
storage001.repopath
\ No newline at end of file
storage001.repopath
\ No newline at end of file
storage001.repopath
\ No newline at end of file
...@@ -18,5 +18,4 @@ ...@@ -18,5 +18,4 @@
, "https://privatestorage-staging.com" , "https://privatestorage-staging.com"
] ]
, "monitoringGoogleOAuthClientID": "802959152038-6esn1c6u2lm3j82lf29jvmn8s63hi8dc.apps.googleusercontent.com" , "monitoringGoogleOAuthClientID": "802959152038-6esn1c6u2lm3j82lf29jvmn8s63hi8dc.apps.googleusercontent.com"
, "borgBackupRepoPath": "tqxc4i79@tqxc4i79.repo.borgbase.com:repo"
} }
...@@ -19,7 +19,7 @@ let ...@@ -19,7 +19,7 @@ let
grid = { grid = {
publicKeyPath = toString ./. + "/${grid-config.publicKeyPath}"; publicKeyPath = toString ./. + "/${grid-config.publicKeyPath}";
privateKeyPath = toString ./. + "/${grid-config.privateKeyPath}"; privateKeyPath = toString ./. + "/${grid-config.privateKeyPath}";
inherit (grid-config) monitoringvpnEndpoint letsEncryptAdminEmail borgBackupRepoPath; inherit (grid-config) monitoringvpnEndpoint letsEncryptAdminEmail;
}; };
# Configure deployment management authorization for all systems in the grid. # Configure deployment management authorization for all systems in the grid.
services.private-storage.deployment = { services.private-storage.deployment = {
......
tqxc4i79@tqxc4i79.repo.borgbase.com:repo
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
The domain name and port of the monitoring VPN endpoint. The domain name and port of the monitoring VPN endpoint.
''; '';
}; };
letsEncryptAdminEmail = lib.mkOption { letsEncryptAdminEmail = lib.mkOption {
type = lib.types.str; type = lib.types.str;
description = '' description = ''
...@@ -37,12 +38,6 @@ ...@@ -37,12 +38,6 @@
certificate issuance. certificate issuance.
''; '';
}; };
borgBackupRepoPath = lib.mkOption {
type = lib.types.str;
description = ''
The Borg backup repository shared between all nodes of one grid.
'';
};
}; };
# Any extra NixOS modules to load on all our servers. Note that just # Any extra NixOS modules to load on all our servers. Note that just
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
{ lib, config, ...}: { lib, config, ...}:
let let
cfg = config.services.private-storage.borgbackup; cfg = config.services.private-storage.borgbackup;
inherit (config.grid) publicKeyPath privateKeyPath borgBackupRepoPath; inherit (config.grid) publicKeyPath privateKeyPath;
# Get a per-host number of hours to start the backup at a # Get a per-host number of hours to start the backup at a
# time that should be "night" in most of the USA: # time that should be "night" in most of the USA:
...@@ -46,9 +46,8 @@ in { ...@@ -46,9 +46,8 @@ in {
services.borgbackup.jobs = { services.borgbackup.jobs = {
daily = { daily = {
paths = cfg.paths; paths = cfg.paths;
repo = lib.fileContents "${publicKeyPath}/borgbackup/${config.networking.hostName}.repopath";
doInit = false; doInit = false;
repo = borgBackupRepoPath;
archiveBaseName = config.networking.hostName;
encryption = { encryption = {
mode = "repokey-blake2"; mode = "repokey-blake2";
passCommand = "cat /run/keys/borgbackup/passphrase"; passCommand = "cat /run/keys/borgbackup/passphrase";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment