add borg client to thinkpad

This commit is contained in:
Yan Lin 2025-12-13 11:13:51 +01:00
parent cb21d0068d
commit 092626b754
3 changed files with 28 additions and 24 deletions

View file

@ -8,7 +8,8 @@
../../../modules/podman.nix ../../../modules/podman.nix
../../../modules/tailscale.nix ../../../modules/tailscale.nix
../../../modules/login-display.nix ../../../modules/login-display.nix
../../../modules/borg/server.nix ../../../modules/borg/client.nix
../../../modules/samba.nix
]; ];
# Bootloader - standard UEFI setup # Bootloader - standard UEFI setup
@ -192,15 +193,30 @@
"/dev/nvme0n1" = "System_SSD"; "/dev/nvme0n1" = "System_SSD";
}; };
showDiskUsage = true; showDiskUsage = true;
showBorgStatus = true;
}; };
services.borg-server-custom = { services.borg-client-custom = {
enable = true; enable = true;
users = { repositoryUrl = "ssh://borg-box/./thinkpad";
borg = { backupPaths = [
publicKeys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICp2goZiuSfwMA02GsHhYzUZHrQPPBgP5sWSNP9kQR3e yanlin@imac" ]; "/home/yanlin/immich/ext-library/"
"/home/yanlin/immich/photo-library/library/admin/"
"/home/yanlin/nsfw"
];
backupFrequency = "*-*-* 00:00:00";
retention = {
keepDaily = 7;
keepWeekly = 4;
keepMonthly = 6;
keepYearly = 2;
}; };
}; };
services.samba-custom = {
sharedPath = "/home/yanlin/nsfw/";
shareName = "nsfw";
user = "yanlin";
}; };
} }

View file

@ -30,15 +30,6 @@
identityFile = "~/Credentials/ssh_keys/aicloud"; identityFile = "~/Credentials/ssh_keys/aicloud";
}; };
"hs" = {
hostname = "hs.yanlincs.com";
user = "yanlin";
identityFile = "~/Credentials/ssh_keys/nas";
setEnv = {
TERM = "xterm-256color";
};
};
"thinkpad" = { "thinkpad" = {
hostname = "thinkpad.yanlincs.com"; hostname = "thinkpad.yanlincs.com";
user = "yanlin"; user = "yanlin";
@ -54,11 +45,11 @@
identityFile = "~/Credentials/ssh_keys/hetzner"; identityFile = "~/Credentials/ssh_keys/hetzner";
}; };
"borg-server" = { "borg-box" = {
hostname = "thinkpad.yanlincs.com"; hostname = "u518619.your-storagebox.de";
user = "borg"; user = "u518619";
identityFile = "~/Credentials/ssh_keys/thinkpad"; port = 23;
proxyJump = "vps"; identityFile = "~/Credentials/ssh_keys/hetzner";
}; };
}; };

View file

@ -22,7 +22,7 @@ let
stignoreContent = lib.concatStringsSep "\n" commonIgnores; stignoreContent = lib.concatStringsSep "\n" commonIgnores;
# Device groupings # Device groupings
pcDevices = [ "macbook" "imac" "hs" "thinkpad" ]; pcDevices = [ "macbook" "imac" "thinkpad" ];
touchDevices = [ "iphone" "ipad" ]; touchDevices = [ "iphone" "ipad" ];
allDevices = pcDevices ++ touchDevices; allDevices = pcDevices ++ touchDevices;
@ -69,9 +69,6 @@ in
"iphone" = { "iphone" = {
id = "NMWI5MP-J4FC4A6-SDDXZPD-G66TJCO-2W7KGFD-RJWQ53U-I7GUVWP-WHF4QQO"; id = "NMWI5MP-J4FC4A6-SDDXZPD-G66TJCO-2W7KGFD-RJWQ53U-I7GUVWP-WHF4QQO";
}; };
"hs" = {
id = "GH5D3DJ-PAGKBL6-3VDZJRT-QG4ZMRD-GHCCA3Y-HM2H5CE-NAMJYRR-VHLOOQH";
};
"thinkpad" = { "thinkpad" = {
id = "OMZKASU-QPZDCQ2-7QRHRD4-3TPAXLM-AYRMWXB-A6E5OIZ-MGR422V-JYARQA6"; id = "OMZKASU-QPZDCQ2-7QRHRD4-3TPAXLM-AYRMWXB-A6E5OIZ-MGR422V-JYARQA6";
}; };