mirror of
https://github.com/thiloho/nixos-config.git
synced 2026-01-11 21:44:48 +01:00
Add restic backups for other services
This commit is contained in:
18
flake.lock
generated
18
flake.lock
generated
@@ -112,11 +112,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1702538064,
|
||||
"narHash": "sha256-At5GwJPu2tzvS9dllhBoZmqK6lkkh/sOp2YefWRlaL8=",
|
||||
"lastModified": 1702937117,
|
||||
"narHash": "sha256-4GjkL2D01bDg00UZN/SeGrnBZrDVOFeZTbQx6U702Vc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "0e2e443ff24f9d75925e91b89d1da44b863734af",
|
||||
"rev": "e8aaced73ebaf6bfa8e3c6ab0a19cb184bc4d798",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -143,11 +143,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1702312524,
|
||||
"narHash": "sha256-gkZJRDBUCpTPBvQk25G0B7vfbpEYM5s5OZqghkjZsnE=",
|
||||
"lastModified": 1702830618,
|
||||
"narHash": "sha256-lvhwIvRwhOLgzbRuYkqHy4M5cQHYs4ktL6/hyuBS6II=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a9bf124c46ef298113270b1f84a164865987a91c",
|
||||
"rev": "91a00709aebb3602f172a0bf47ba1ef013e34835",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -176,11 +176,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701538969,
|
||||
"narHash": "sha256-lew3ve6tYpfZa7tcJBreDstP8tT9DbjFp4XxGZt84Ac=",
|
||||
"lastModified": 1703227072,
|
||||
"narHash": "sha256-ysgm3+lAePFCHuklFqNEL6RkmHNV+/ARMUM049vcCzk=",
|
||||
"owner": "thiloho",
|
||||
"repo": "todos",
|
||||
"rev": "84ccb21a2f1f3690368b62a870755d56a53a782c",
|
||||
"rev": "2071a45f11c55853cb88bd46211cee28a60cac2a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -15,7 +15,16 @@
|
||||
todos-environment-file.file = ../../secrets/todos-environment-file.age;
|
||||
"restic/minecraft-environment-file".file = ../../secrets/restic/minecraft-environment-file.age;
|
||||
"restic/minecraft-repository".file = ../../secrets/restic/minecraft-repository.age;
|
||||
"restic/password".file = ../../secrets/restic/password.age;
|
||||
"restic/minecraft-password".file = ../../secrets/restic/minecraft-password.age;
|
||||
"restic/hedgedoc-environment-file".file = ../../secrets/restic/hedgedoc-environment-file.age;
|
||||
"restic/hedgedoc-repository".file = ../../secrets/restic/hedgedoc-repository.age;
|
||||
"restic/hedgedoc-password".file = ../../secrets/restic/hedgedoc-password.age;
|
||||
"restic/todos-environment-file".file = ../../secrets/restic/todos-environment-file.age;
|
||||
"restic/todos-repository".file = ../../secrets/restic/todos-repository.age;
|
||||
"restic/todos-password".file = ../../secrets/restic/todos-password.age;
|
||||
"restic/discord-bot-environment-file".file = ../../secrets/restic/discord-bot-environment-file.age;
|
||||
"restic/discord-bot-repository".file = ../../secrets/restic/discord-bot-repository.age;
|
||||
"restic/discord-bot-password".file = ../../secrets/restic/discord-bot-password.age;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
@@ -146,12 +155,69 @@
|
||||
|
||||
environmentFile = config.age.secrets."restic/minecraft-environment-file".path;
|
||||
repositoryFile = config.age.secrets."restic/minecraft-repository".path;
|
||||
passwordFile = config.age.secrets."restic/password".path;
|
||||
passwordFile = config.age.secrets."restic/minecraft-password".path;
|
||||
|
||||
paths = [
|
||||
"/var/lib/minecraft/world"
|
||||
];
|
||||
|
||||
pruneOpts = [
|
||||
"--keep-daily 7"
|
||||
"--keep-weekly 5"
|
||||
"--keep-monthly 12"
|
||||
];
|
||||
};
|
||||
hedgedoc-database-backup = {
|
||||
initialize = true;
|
||||
|
||||
environmentFile = config.age.secrets."restic/hedgedoc-environment-file".path;
|
||||
repositoryFile = config.age.secrets."restic/hedgedoc-repository".path;
|
||||
passwordFile = config.age.secrets."restic/hedgedoc-password".path;
|
||||
|
||||
paths = [ "/var/lib/hedgedoc/uploads" "/var/lib/hedgedoc/hedgedoc.dump" ];
|
||||
|
||||
backupPrepareCommand = ''
|
||||
${config.services.postgresql.package}/bin/pg_dump -U postgres -Fc hedgedoc > /var/lib/hedgedoc/hedgedoc.dump
|
||||
'';
|
||||
|
||||
pruneOpts = [
|
||||
"--keep-daily 7"
|
||||
"--keep-weekly 5"
|
||||
"--keep-monthly 12"
|
||||
];
|
||||
};
|
||||
todos-database-backup = {
|
||||
initialize = true;
|
||||
|
||||
environmentFile = config.age.secrets."restic/todos-environment-file".path;
|
||||
repositoryFile = config.age.secrets."restic/todos-repository".path;
|
||||
passwordFile = config.age.secrets."restic/todos-password".path;
|
||||
|
||||
paths = [ "/var/lib/todos.dump" ];
|
||||
|
||||
backupPrepareCommand = ''
|
||||
${config.services.postgresql.package}/bin/pg_dump -U todos -Fc > /var/lib/todos.dump
|
||||
'';
|
||||
|
||||
pruneOpts = [
|
||||
"--keep-daily 7"
|
||||
"--keep-weekly 5"
|
||||
"--keep-monthly 12"
|
||||
];
|
||||
};
|
||||
discord-bot-database-backup = {
|
||||
initialize = true;
|
||||
|
||||
environmentFile = config.age.secrets."restic/discord-bot-environment-file".path;
|
||||
repositoryFile = config.age.secrets."restic/discord-bot-repository".path;
|
||||
passwordFile = config.age.secrets."restic/discord-bot-password".path;
|
||||
|
||||
paths = [ "/var/lib/dcbot.dump" ];
|
||||
|
||||
backupPrepareCommand = ''
|
||||
${config.services.postgresql.package}/bin/pg_dump -U dcbot -Fc > /var/lib/dcbot.dump
|
||||
'';
|
||||
|
||||
pruneOpts = [
|
||||
"--keep-daily 7"
|
||||
"--keep-weekly 5"
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
};
|
||||
vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscodium;
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
svelte.svelte-vscode
|
||||
jnoortheen.nix-ide
|
||||
|
||||
BIN
secrets/restic/discord-bot-environment-file.age
Normal file
BIN
secrets/restic/discord-bot-environment-file.age
Normal file
Binary file not shown.
10
secrets/restic/discord-bot-password.age
Normal file
10
secrets/restic/discord-bot-password.age
Normal file
@@ -0,0 +1,10 @@
|
||||
age-encryption.org/v1
|
||||
-> ssh-ed25519 owVgDA ch9l8hAmzPcDLcDqgHx7CvEHya5Cc+W6WPG5NFWVWAg
|
||||
T+Mb5yxPCSo32EKbpxj/Ll8reLe4sosTd9ENjYV3B0c
|
||||
-> ssh-ed25519 dRl0SQ lPdA7HcBt03GR/EYXs+9N2gPMwEksgQKCSEJHiUYnAU
|
||||
QXruj7Ao1Tap/ai5JYOmxBjIYvocmMYVX2GuCyxSqdI
|
||||
-> SN)(9z-grease CF C B!|*qlm
|
||||
GobRjNqLfEwntbsGa3MpYqYFqkh80ZmtmXVesUKTjAaykeon9mGkW6cI3weL91Dp
|
||||
Jyk5IF10fScpCERAqgUCMPkQ56oFtGESwnZUILqeKIk0QWAZMJWtkBse+AqizX8
|
||||
--- LTF3BpAb4BipCsqr+igNNnu3Guc1JBIgczy5+0S8W4Q
|
||||
Žâ]¯¡[Y<>WðF¥#úùpœFYh@³ùÒ<C3B9>ô|…ë´òˆª®‰Ó]»;V]q˜˜e‡w
|
||||
10
secrets/restic/discord-bot-repository.age
Normal file
10
secrets/restic/discord-bot-repository.age
Normal file
@@ -0,0 +1,10 @@
|
||||
age-encryption.org/v1
|
||||
-> ssh-ed25519 owVgDA lQ3x2Yje/1js+SYkhWvkDtglDMOJySt8FyW+FfQY4Es
|
||||
DfJ3VW7sIx9W7PaLxWod+GSMvYL2763QtI9EJ1Kxt90
|
||||
-> ssh-ed25519 dRl0SQ iTLFTejTbILB/obvLiQB9vAVYBzqTAWaQFtU1iSFwAc
|
||||
/d5xXO4FH57DZQ1bpOom6aX5uujD1SUIpXC9W5u/EKo
|
||||
-> aHYOr}px-grease z x
|
||||
ElchruvBqkjNuIDKNjIniZulfDwSc/0zvZDpmIUCjVk2jj2z/Cty0A6yRhDMpr7s
|
||||
/S5arjCA2zk
|
||||
--- V3FO3trpSDAmwYqDqiS50rzGT6WlOvb5irsfkTSabdY
|
||||
Gf“ÐŽ•ßqÛå”i \v~'Ÿµùnr¤¦4ß!<21><„çŸä9f¿ÐYŽ ‘î°8-‹eƒ¶å
|
||||
BIN
secrets/restic/hedgedoc-environment-file.age
Normal file
BIN
secrets/restic/hedgedoc-environment-file.age
Normal file
Binary file not shown.
9
secrets/restic/hedgedoc-password.age
Normal file
9
secrets/restic/hedgedoc-password.age
Normal file
@@ -0,0 +1,9 @@
|
||||
age-encryption.org/v1
|
||||
-> ssh-ed25519 owVgDA 4ZzMfDC10jWotfzunUhNdhMg3WPGztmKK2cVQKE9H0Q
|
||||
9To1L2Zev0U9beZfrc563fliqm0dsQKRaWwOqzBT7Wk
|
||||
-> ssh-ed25519 dRl0SQ I0l8bUdxSGFB0gcygz0FocuHbrDTJuQuyo8zu++AJns
|
||||
daSQ3vwjjYfMl9x+gn+Nzr9klIEE8x2+9Zkos7aY5sA
|
||||
-> ss#ACz=}-grease Xvlm; 1 @A
|
||||
ou2BEyCRjko
|
||||
--- KMysJrselsTKj8YQYe3VYdn3MzPFhTnnFAfLexvohIo
|
||||
ñº<07>—™:Çh›ZVÁÉ…OCEЊE¯Û°–ÓÑ“<<3C>U¸ˆaWíz |¿
|
||||
10
secrets/restic/hedgedoc-repository.age
Normal file
10
secrets/restic/hedgedoc-repository.age
Normal file
@@ -0,0 +1,10 @@
|
||||
age-encryption.org/v1
|
||||
-> ssh-ed25519 owVgDA /9d1EdSTGvjj391MhHmCi34WcSd4YohJuE13f5Gqo24
|
||||
BKFoKgiorkWk/J7LsRe14FeuAh8zcVPElOY1Ifapv1Y
|
||||
-> ssh-ed25519 dRl0SQ BthbYG+p4HcrqcOxpc09n/Fo5OCUKfvVzhvcA3TslCQ
|
||||
vapeXaR+9hu+eZecYchKxgFy9fSEiMzzpZliMGYx55c
|
||||
-> V"-grease XZ7z!A^ cxOP:.6
|
||||
z9ZbjqFMkBkGCylTNl9dt/5lshUV7kEvdMArCZH+Qc2pAULo6hctOO2sxvqeN9SG
|
||||
7MlLRz/xhKB+jcxj5dD46LlneS6+dYQ49McCW1YA1l3dIlIVgi8KT0sVlw
|
||||
--- Ylmc2BDrLW+jcmDs7bbeY3O9d+PjZ33Bs9gb2N7t7ww
|
||||
O€ 6ØÎ·üSMÌ`ñ+qQÃWƒÅÖ Êxäk»·ùpvî‰OcÙÆì[9”ÆÐ#’e“t>ƒ”îQšÍÙþNlŒÒÆ
|
||||
10
secrets/restic/minecraft-password.age
Normal file
10
secrets/restic/minecraft-password.age
Normal file
@@ -0,0 +1,10 @@
|
||||
age-encryption.org/v1
|
||||
-> ssh-ed25519 owVgDA 7KNI9wfwXEFEERfqr3YlNi3ZxaUVI3pk4dwzRRyr2G8
|
||||
TGrNsb6pFzt3lUzCHScrZPdHvDGqvS8nZk0hZN1uU2g
|
||||
-> ssh-ed25519 dRl0SQ BKqszxsI3ceZkzkNU07MKyF/lpknDgWEymAVkmHJLXA
|
||||
XIVsjB6jDccNpACZtFyuUo5XpWs5A6lA3BNSbh+6Qlg
|
||||
-> 31Zf-grease wB]Jb6x 3 2IrizaM N
|
||||
QA2dGpOzD9vBzjNwbtYX
|
||||
--- Tv3WURbEvNjLuG2NAjTk7EtpyvlXYvesK/35I7Omkq8
|
||||
ZŽÆû¸gì<0C>–$Nè4S#Xž,™©²¬ñžšzþØÅ
|
||||
'ˆ÷$3ÒÀ®íöJ¢¼
|
||||
@@ -1,9 +0,0 @@
|
||||
age-encryption.org/v1
|
||||
-> ssh-ed25519 owVgDA uHkIaE0OZlf5lfboMt7G1SoTQju7V2KLhavgNUmmemI
|
||||
LsVhtV7olRXuoOpVlNtQ7/r9mgCk6GYUfH7USnSy8NY
|
||||
-> ssh-ed25519 dRl0SQ QBYcokbUHfBOYxtMQ3lxn8ovtakSq8mclBpef6mXJFk
|
||||
rwB3HTsbDtzin3UpLEnMzpkBIXMBhM3eS1gA5RkyX6c
|
||||
-> lW-grease H]~ U`GrO @pIL!eeO
|
||||
KGPJugVtnjtmhSTuModTRF8zu5+BIKA/vKns6hw
|
||||
--- KIqadbISsYbNfx/tVpsPV6YrjbgbWdGjqabBzg3lBdo
|
||||
Âì'{¹4O-%»¢]¤UQ@íæô4’yõý-æŸå5Ñgh‡î¡{D,ÝůF@pî”ÆÒ
|
||||
9
secrets/restic/todos-environment-file.age
Normal file
9
secrets/restic/todos-environment-file.age
Normal file
@@ -0,0 +1,9 @@
|
||||
age-encryption.org/v1
|
||||
-> ssh-ed25519 owVgDA e5rW7H9HgvaH+pBahXl0NVLHauyTiMJZ09Y25uE7oFU
|
||||
iZf1dOAdiXMhL6X6Wz9F+Qjn1gOkOIRGkpd5FkNKmJA
|
||||
-> ssh-ed25519 dRl0SQ o22AeR8iBA2BqiBoR1bBzEJ4VUK7l3li7W0/CxpfaWQ
|
||||
glw7c+VY2hWOOfPaGt1dTGXOMovZ4L6FHELNLqsYpgM
|
||||
-> I:-grease QNX|`\ `,>k[ z!/ajk} ~OE
|
||||
IDHem1mSEg
|
||||
--- K5e+NoqGSWtZ0iwNiWviniiORG0yT0qvf/xoqIxofiw
|
||||
Q<01>0Cóº·Ê`€ô¤Ÿº Ùë·|X¦ydbè73ÿñ`x%ëÆºå{
|
||||
BIN
secrets/restic/todos-password.age
Normal file
BIN
secrets/restic/todos-password.age
Normal file
Binary file not shown.
11
secrets/restic/todos-repository.age
Normal file
11
secrets/restic/todos-repository.age
Normal file
@@ -0,0 +1,11 @@
|
||||
age-encryption.org/v1
|
||||
-> ssh-ed25519 owVgDA LAiIoN6jO47UdnkN2rZiayFuYNLDzvPYTrBIcyoNego
|
||||
t0O3SjuBGqWl7apz8LIdemxWIOYgJtml0uTpihbu+UY
|
||||
-> ssh-ed25519 dRl0SQ YB735jB9c4KHDcoPL9AdgDWlJ01MDzioenShpCEuSHw
|
||||
ePM/LJ5b3Lc6mH8sYSEgnw40cHpxcSBLTT+BRThPc8o
|
||||
-> sf;0zl-grease \R8 XL!~>Q#
|
||||
vqybxsDF6ttWkv27cUrFrrpToAmTvq03nDYiMEYO5OA8n8tIN5HVri7hxJOVCLwJ
|
||||
5TkgdX2a+JiODe0vM8Tp3UaQIHeyuQA8FzMhowJ5gY+3vNtiJvxa/XZeQ/gsx//4
|
||||
5w
|
||||
--- 48SbG3pL8jLUA3EteqZ3AC3s8gC84VHgfrxnUqCpeX8
|
||||
x·t{Ãäׂ$%zœV‚†è´ÈÛµÎU¥ŸÕŽ-¶¼.Ê|Ž>ǪMÿ5‰²'Z¯±ˆÃX;K)Æ™2‚×|Ùi
|
||||
@@ -6,7 +6,16 @@ in
|
||||
"hedgedoc-environment-file.age".publicKeys = [ server pc ];
|
||||
"discord-bot-token.age".publicKeys = [ server pc ];
|
||||
"todos-environment-file.age".publicKeys = [ server pc ];
|
||||
"restic/password.age".publicKeys = [ server pc ];
|
||||
"restic/minecraft-password.age".publicKeys = [ server pc ];
|
||||
"restic/minecraft-environment-file.age".publicKeys = [ server pc ];
|
||||
"restic/minecraft-repository.age".publicKeys = [ server pc ];
|
||||
"restic/hedgedoc-password.age".publicKeys = [ server pc ];
|
||||
"restic/hedgedoc-environment-file.age".publicKeys = [ server pc ];
|
||||
"restic/hedgedoc-repository.age".publicKeys = [ server pc ];
|
||||
"restic/todos-password.age".publicKeys = [ server pc ];
|
||||
"restic/todos-environment-file.age".publicKeys = [ server pc ];
|
||||
"restic/todos-repository.age".publicKeys = [ server pc ];
|
||||
"restic/discord-bot-password.age".publicKeys = [ server pc ];
|
||||
"restic/discord-bot-environment-file.age".publicKeys = [ server pc ];
|
||||
"restic/discord-bot-repository.age".publicKeys = [ server pc ];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user