setup backup on titan and nix fmt

This commit is contained in:
cy 2024-12-30 23:14:50 -05:00
parent d428cd2377
commit a372071b70
9 changed files with 127 additions and 24 deletions

View file

@ -2,7 +2,6 @@
config,
lib,
pkgs,
inputs,
...
}:
{
@ -26,10 +25,6 @@
./conduit.nix
./immich.nix
./element.nix
{
disabledModules = [ "services/backup/borgbackup.nix" ];
}
(inputs.nixpkgs-borg + "/nixos/modules/services/backup/borgbackup.nix")
];
sops.age.keyFile = "/root/.config/sops/age/keys.txt";

17
hosts/titan/backup.nix Normal file
View file

@ -0,0 +1,17 @@
{
config,
...
}:
{
my.backup = {
enable = true;
jobName = "titanRsync";
exclude = [
# podman stuff
"/var/lib/containers"
];
repo = "titan";
passFile = config.sops.secrets."borg/rsyncnet".path;
sshKeyFile = config.sops.secrets."rsyncnet/id_ed25519".path;
};
}

View file

@ -15,6 +15,7 @@
./ghost.nix
./ntfy.nix
./uptime-kuma.nix
./backup.nix
];
sops.age.keyFile = "/root/.config/sops/age/keys.txt";
@ -22,6 +23,15 @@
"caddy/env" = {
sopsFile = ../../secrets/services/caddy.yaml;
};
"services/ntfy" = {
sopsFile = ../../secrets/services/ntfy.yaml;
};
"borg/rsyncnet" = {
sopsFile = ../../secrets/borg/titan.yaml;
};
"rsyncnet/id_ed25519" = {
sopsFile = ../../secrets/de3911/titan.yaml;
};
};
boot = {

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
# data stored at /var/lib/uptime-kuma/ but does not expose
# an option to change it
services.uptime-kuma = {

View file

@ -11,11 +11,9 @@
../yt.nix
{
disabledModules = [
"services/backup/borgbackup.nix"
"services/backup/btrbk.nix"
];
}
(inputs.nixpkgs-borg + "/nixos/modules/services/backup/borgbackup.nix")
(inputs.nixpkgs-btrbk + "/nixos/modules/services/backup/btrbk.nix")
];
@ -188,7 +186,7 @@
programs.sway.enable = true;
my.backup= {
my.backup = {
enable = true;
jobName = "ytnixRsync";
exclude = [