backwards/manatee: Move restic backup to mantee
This commit is contained in:
@@ -14,7 +14,6 @@ in
|
|||||||
git.enable = true;
|
git.enable = true;
|
||||||
nginx.enable = true;
|
nginx.enable = true;
|
||||||
syncthing.enable = true;
|
syncthing.enable = true;
|
||||||
restic.enable = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,74 +0,0 @@
|
|||||||
{ lib, config, ... }:
|
|
||||||
let
|
|
||||||
enabled = config.mod.restic.enable;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
mod.restic = {
|
|
||||||
enable = lib.mkEnableOption "Enable restic";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf enabled {
|
|
||||||
fileSystems."/home/alex/backup" = {
|
|
||||||
device = "/dev/disk/by-uuid/34601701-65e6-4b2c-ac4d-8bef3dfd743f";
|
|
||||||
fsType = "ext4";
|
|
||||||
options = [ "nofail" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
services = {
|
|
||||||
restic.backups = {
|
|
||||||
"sync-to-external" = {
|
|
||||||
initialize = true;
|
|
||||||
|
|
||||||
passwordFile = config.age.secrets.restic-password.path;
|
|
||||||
|
|
||||||
paths = [ "/home/alex/sync" ];
|
|
||||||
repository = "/home/alex/backup/restic";
|
|
||||||
|
|
||||||
timerConfig = {
|
|
||||||
OnCalendar = "*-*-* 0/12:00:00"; # Every 12th hour, i.e. twice a day
|
|
||||||
Persistent = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
pruneOpts = [
|
|
||||||
"--keep-daily 1"
|
|
||||||
"--keep-weekly 7"
|
|
||||||
"--keep-yearly 12"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
"sync-to-cloud" = {
|
|
||||||
initialize = true;
|
|
||||||
|
|
||||||
passwordFile = config.age.secrets.restic-password.path;
|
|
||||||
environmentFile = config.age.secrets.restic-cloud-sync-key.path;
|
|
||||||
repositoryFile = config.age.secrets.restic-cloud-sync-repository.path;
|
|
||||||
|
|
||||||
paths = [ "/home/alex/sync" ];
|
|
||||||
exclude = [ "/home/alex/sync/reading-material" ];
|
|
||||||
|
|
||||||
timerConfig = {
|
|
||||||
OnCalendar = "*-*-* 0/12:00:00"; # Every 12th hour, i.e. twice a day
|
|
||||||
Persistent = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
pruneOpts = [
|
|
||||||
"--keep-daily 1"
|
|
||||||
"--keep-weekly 7"
|
|
||||||
"--keep-yearly 12"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
age = {
|
|
||||||
secrets = {
|
|
||||||
"restic-password".file = ../../../../secrets/backwards/restic-password.age;
|
|
||||||
"restic-cloud-sync-key".file = ../../../../secrets/backwards/restic-cloud-sync-key.age;
|
|
||||||
"restic-cloud-sync-repository".file =
|
|
||||||
../../../../secrets/backwards/restic-cloud-sync-repository.age;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -16,6 +16,7 @@ in
|
|||||||
|
|
||||||
nginx.enable = true;
|
nginx.enable = true;
|
||||||
syncthing.enable = true;
|
syncthing.enable = true;
|
||||||
|
restic.enable = true;
|
||||||
transmission.enable = true;
|
transmission.enable = true;
|
||||||
audiobookshelf.enable = true;
|
audiobookshelf.enable = true;
|
||||||
jellyfin.enable = true;
|
jellyfin.enable = true;
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
{ lib, config, ... }:
|
||||||
|
let
|
||||||
|
enabled = config.mod.restic.enable;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.mod.restic.enable = lib.mkEnableOption "Enable restic";
|
||||||
|
|
||||||
|
config = lib.mkIf enabled {
|
||||||
|
fileSystems."/mnt/backup" = {
|
||||||
|
device = "/dev/disk/by-uuid/34601701-65e6-4b2c-ac4d-8bef3dfd743f";
|
||||||
|
fsType = "ext4";
|
||||||
|
options = [ "nofail" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.restic.backups = {
|
||||||
|
"sync-to-external" = {
|
||||||
|
initialize = true;
|
||||||
|
passwordFile = config.age.secrets.restic-password.path;
|
||||||
|
paths = [ "/mnt/sync/public" ];
|
||||||
|
repository = "/mnt/backup/restic";
|
||||||
|
timerConfig = {
|
||||||
|
OnCalendar = "*-*-* 0/12:00:00";
|
||||||
|
Persistent = true;
|
||||||
|
};
|
||||||
|
pruneOpts = [
|
||||||
|
"--keep-daily 1"
|
||||||
|
"--keep-weekly 7"
|
||||||
|
"--keep-yearly 12"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
"sync-to-cloud" = {
|
||||||
|
initialize = true;
|
||||||
|
passwordFile = config.age.secrets.restic-password.path;
|
||||||
|
environmentFile = config.age.secrets.restic-cloud-sync-key.path;
|
||||||
|
repositoryFile = config.age.secrets.restic-cloud-sync-repository.path;
|
||||||
|
paths = [ "/mnt/sync/public" ];
|
||||||
|
timerConfig = {
|
||||||
|
OnCalendar = "*-*-* 0/12:00:00";
|
||||||
|
Persistent = true;
|
||||||
|
};
|
||||||
|
pruneOpts = [
|
||||||
|
"--keep-daily 1"
|
||||||
|
"--keep-weekly 7"
|
||||||
|
"--keep-yearly 12"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
age.secrets = {
|
||||||
|
"restic-password".file = ../../../../secrets/manatee/restic-password.age;
|
||||||
|
"restic-cloud-sync-key".file = ../../../../secrets/manatee/restic-cloud-sync-key.age;
|
||||||
|
"restic-cloud-sync-repository".file = ../../../../secrets/manatee/restic-cloud-sync-repository.age;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
age-encryption.org/v1
|
|
||||||
-> ssh-ed25519 Pu0HWg rTAkGJbth0WCE8KM50fHaCyXeO/NrmWXiDT/JH9ciAI
|
|
||||||
kTMVbJRwOSh9Da1O9YYx21/7IdfZrb2OhoOJxNEIKSg
|
|
||||||
-> ssh-ed25519 +oNaHQ DtMpPTuAjS1GyK2WalNJzErEE1mCos/R5aZyMnun+UQ
|
|
||||||
B81FnJ5z70HzI6yvqiy6Lhr2X9ZjEi5dhM6u47flujA
|
|
||||||
--- r9HCFWVU5LBiRBdRwOA1+IRBY1/I/1UeukGtFz7BxWE
|
|
||||||
TÔK%£žWÔ*&˜Ä°–-&àÛÕ8)|×áॣù Œ¯è07—�µ¾ªŒúÍòl»ÁQò0†ÒßÔ––ÆÂ]¬¬Û¸”mP”^~ç/þ#†šõæ"ëÀš+ž)ÕY¾n¼@ã჌R§“¨_pÓÂFÜÛ%᤼#
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
age-encryption.org/v1
|
|
||||||
-> ssh-ed25519 Pu0HWg tZ6zAXOBdiWyyUeOZZ66w1ij8xuHY98fvClPn8/jQVs
|
|
||||||
AVp3Y04vSbnkurqjAouiDojd5IMFVCYyldXv0v4n9W4
|
|
||||||
-> ssh-ed25519 +oNaHQ KK44MdrfQLZK44eYWpLiTFm3d/bx6WTsHm98MkvhQTw
|
|
||||||
CYJJWbpHbLQHvzTWLbujg1AZ3KvgCshVUrolPE1hUho
|
|
||||||
--- aBOxH3rbMriVBctdVGdQXFH/KYWLbweGzda5sN4HJOA
|
|
||||||
íNo´Ç¡O>š‡æãõ\IÉ#0¬‰õ+Y8ƒvàCS#é�O›žÖeGè;-T“d®�,V@3” 䛸þ]`Ç\b²Dõ+„ö6½öšð䘤nŠ%‡NÈ’
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
age-encryption.org/v1
|
|
||||||
-> ssh-ed25519 Pu0HWg qmcWFPndrhXlpjBtSsVNARAOHM9UNtfcEvtSGx/BLHY
|
|
||||||
EdnzUWju9g61idxWmDaaxSZ6ZiVvhFLOKH3hY1Kyk8s
|
|
||||||
-> ssh-ed25519 +oNaHQ CMBvVWHwVsY89rbdYvVoVeoZlIXLJoIN8xsoqqBnSiA
|
|
||||||
+xogVU/MBezQzq1rbIOqT5PGNYqM8o0Pmojk2npqT4U
|
|
||||||
--- mdhPf3weI9cOcaAh9j/CVB+KRfPSRuT678oueeJjdCk
|
|
||||||
ZñmݹÿÅÓº*ˆŒ9kÀw¶N¯Zh&ÈGô␍ßkÞÀºÆŸþŸA#ª“�lù u¤Qôïù—›ÛîTÔŸ×˜Ž²Ž,ßC�V3†Äµ”
|
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
age-encryption.org/v1
|
||||||
|
-> ssh-ed25519 wkRvNA T7nivShTgBPRAWTTOUYWfCWNAFlQ5e6rlB92XV/xRVM
|
||||||
|
JJrxtTSteza0sCOJVz4z8y/8npX3hWhfo8y85UFAU80
|
||||||
|
-> ssh-ed25519 +oNaHQ DuAtW/id53RC4G4EKWr2y1G8K7UbI5r1vGf1ICG5pC8
|
||||||
|
xkkGeHOjMmuJ0mKnziUALSEJpV/fVUX5oOBiTptuapo
|
||||||
|
--- aVjxHPHDuWLhSPMKG5wE67YIzR18LKihrcPqYC+8bnM
|
||||||
|
…Ób”áõˆ–3qÆó|À7܇È}žÀœŠMí ;† [␍LH% Úr‰ævdTíþY….¯t¾Ì©zFÒ*©3-±D¾ð:¾Š©Y>ûòÀþõò“Tn2Fž¡HJŽM_¶éŒ{$ÑOUšä˜º,ìÝÑ•”k*l¢D���¥^ÏTd+®†
|
||||||
Binary file not shown.
@@ -0,0 +1,7 @@
|
|||||||
|
age-encryption.org/v1
|
||||||
|
-> ssh-ed25519 wkRvNA eL6ZQuNPvdO0gHEW5IObuLQzcOFpOaxzw/wcYvuxfUs
|
||||||
|
M88b5Ex9I3XY29oYML73BM/0TLo+e4pGG008M2VloKM
|
||||||
|
-> ssh-ed25519 +oNaHQ hIzDhww0WePNFVdvTwGL9wsOWN9r0ZiUmYkjb82KeQg
|
||||||
|
DwwCiFXFbYQV64JuRc8pc997CY+2rZxC8cRdTvHPSqA
|
||||||
|
--- u37YqZsBBtrxZ0Wmw6QJWgazNbqW00GVsQgyRxE41Gc
|
||||||
|
›-bpP ÷W.²ˆ-»:ˆNÕûc¦~‡géH‚u\¸MaX·prACæU�)¾lÓá:—+Û\X\í<N¸ J`"Þðo»éDÆtOÂ8²å…
|
||||||
+3
-3
@@ -45,6 +45,9 @@ in {
|
|||||||
"manatee/puppy-tracker-invite-code.age".publicKeys = [ manatee alex ];
|
"manatee/puppy-tracker-invite-code.age".publicKeys = [ manatee alex ];
|
||||||
"manatee/solo-referee-api-key.age".publicKeys = [ manatee alex ];
|
"manatee/solo-referee-api-key.age".publicKeys = [ manatee alex ];
|
||||||
"manatee/todo-token.age".publicKeys = [ manatee alex ];
|
"manatee/todo-token.age".publicKeys = [ manatee alex ];
|
||||||
|
"manatee/restic-password.age".publicKeys = [ manatee alex ];
|
||||||
|
"manatee/restic-cloud-sync-key.age".publicKeys = [ manatee alex ];
|
||||||
|
"manatee/restic-cloud-sync-repository.age".publicKeys = [ manatee alex ];
|
||||||
|
|
||||||
"backwards/root.backwards.age".publicKeys = [ backwards alex ];
|
"backwards/root.backwards.age".publicKeys = [ backwards alex ];
|
||||||
"backwards/root.backwards.pub.age".publicKeys = [ backwards alex ];
|
"backwards/root.backwards.pub.age".publicKeys = [ backwards alex ];
|
||||||
@@ -52,9 +55,6 @@ in {
|
|||||||
"backwards/alex.backwards-manatee.pub.age".publicKeys = [ backwards manatee alex ];
|
"backwards/alex.backwards-manatee.pub.age".publicKeys = [ backwards manatee alex ];
|
||||||
"backwards/syncthing-cert.age".publicKeys = [ backwards alex ];
|
"backwards/syncthing-cert.age".publicKeys = [ backwards alex ];
|
||||||
"backwards/syncthing-key.age".publicKeys = [ backwards alex ];
|
"backwards/syncthing-key.age".publicKeys = [ backwards alex ];
|
||||||
"backwards/restic-password.age".publicKeys = [ backwards alex ];
|
|
||||||
"backwards/restic-cloud-sync-key.age".publicKeys = [ backwards alex ];
|
|
||||||
"backwards/restic-cloud-sync-repository.age".publicKeys = [ backwards alex ];
|
|
||||||
"backwards/alex.backwards-git.ppp.pm.age".publicKeys = [ backwards alex ];
|
"backwards/alex.backwards-git.ppp.pm.age".publicKeys = [ backwards alex ];
|
||||||
"backwards/alex.backwards-git.ppp.pm.pub.age".publicKeys = [ backwards alex ];
|
"backwards/alex.backwards-git.ppp.pm.pub.age".publicKeys = [ backwards alex ];
|
||||||
"backwards/wireless-network-secrets.age".publicKeys = [ backwards alex ];
|
"backwards/wireless-network-secrets.age".publicKeys = [ backwards alex ];
|
||||||
|
|||||||
Reference in New Issue
Block a user