add reformatted backups as test
This commit is contained in:
@@ -37,6 +37,10 @@ in
|
|||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "base domain used for reverse proxy";
|
description = "base domain used for reverse proxy";
|
||||||
};
|
};
|
||||||
|
backup_repo = lib.mkOption {
|
||||||
|
type = lib.types.path;
|
||||||
|
default = "/holocron/archives/homelab";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# the order determines the order in glance :3
|
# the order determines the order in glance :3
|
||||||
@@ -73,5 +77,21 @@ in
|
|||||||
group = cfg.media_group;
|
group = cfg.media_group;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.borgbackup.jobs = lib.attrsets.mapAttrs (name: arg: {
|
||||||
|
repo = cfg.backup_repo;
|
||||||
|
paths = arg.paths;
|
||||||
|
compression = "auto,zstd";
|
||||||
|
startAt = "daily";
|
||||||
|
encryption.mode = "repokey";
|
||||||
|
encryption.passCommand = "cat ${config.sops.secrets."borg_passwd".path}";
|
||||||
|
}) config.system.backups.baks;
|
||||||
|
|
||||||
|
sops.secrets = {
|
||||||
|
"borg_passwd" = {
|
||||||
|
owner = "root";
|
||||||
|
group = "root";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
users = {
|
users = {
|
||||||
"blake" = import ./dots/bundles/nixos.nix;
|
"blake" = import ./dots/bundles/snowbelle.nix;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user