Add borg server module

This commit is contained in:
Yan Lin 2025-09-13 21:16:33 +02:00
parent b18c5b4bec
commit 3b3c58b346
4 changed files with 198 additions and 2 deletions

View file

@ -2,6 +2,7 @@
imports = [
./hardware-configuration.nix
../../../modules/wireguard.nix
../../../modules/borg-server.nix
];
# Bootloader - standard UEFI setup
@ -353,6 +354,19 @@
};
};
# Borg backup server configuration
services.borgbackup-server = {
enable = true;
dataDir = "/srv/borg";
users = {
borg = {
publicKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG26nw5vhvMl0FoFJbsLBb0mqziiSKS7tuK4IVcvWhKk yanlin@mba"
];
};
};
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken.

View file

@ -96,8 +96,8 @@
# Borg backup configuration
services.borgbackup-custom = {
enable = true;
# Use SSH alias from SSH config for remote backup
repositoryUrl = "ssh://storage-box/./vps";
# Use SSH alias from SSH config for remote backup to thinkpad borg server
repositoryUrl = "ssh://borg-backup/./vps";
backupPaths = [
"/home"
"/var/lib/containers"