refactor: organizing some imports

This commit is contained in:
gwg313 2024-09-11 13:59:52 -04:00
parent c4f7a64329
commit db319ed5af
Signed by: gwg313
GPG key ID: 60FF63B4826B7400
8 changed files with 184 additions and 95 deletions

View file

@ -1,21 +1,33 @@
{
config,
lib,
user,
...
}: {
sops.secrets.restic_key = {
owner = config.users.users.${user}.name;
options = {
restic.enable = lib.mkEnableOption "Enables Restic";
};
services.restic.backups = {
backups = {
user = "${user}";
repository = "/backups";
initialize = true;
passwordFile = "${config.sops.secrets.restic_key.path}";
paths = ["/home/${user}/repos" "/home/${user}/Documents" "/home/${user}/.local/share/password-store" "/home/${user}/.local/share/buku"];
timerConfig = {
onCalendar = "saturday 23:00";
config = lib.mkIf config.nfs.enable {
sops.secrets.restic_key = {
owner = config.users.users.${user}.name;
};
services.restic.backups = {
backups = {
user = "${user}";
repository = "/backups";
initialize = true;
passwordFile = "${config.sops.secrets.restic_key.path}";
paths = [
"/home/${user}/repos"
"/home/${user}/Documents"
"/home/${user}/.local/share/password-store"
"/home/${user}/.local/share/buku"
];
timerConfig = {
onCalendar = "saturday 23:00";
};
};
};
};