Sync to ~/Sync and remove obsolete backup
This commit is contained in:
parent
73736b73ea
commit
65c5f4883f
3 changed files with 38 additions and 36 deletions
|
|
@ -4,37 +4,39 @@
|
|||
secrets,
|
||||
...
|
||||
}:
|
||||
# {
|
||||
# age.secrets.roam-rclone-conf = {
|
||||
# file = secrets.roam."rclone-conf.age";
|
||||
# mode = "440";
|
||||
# owner = "root";
|
||||
# group = "root";
|
||||
# };
|
||||
#
|
||||
# systemd = {
|
||||
# timers."backup-rclone" = {
|
||||
# wantedBy = [ "timers.target" ];
|
||||
# timerConfig = {
|
||||
# OnCalendar = "daily";
|
||||
# Persistent = true;
|
||||
# Unit = "backup-rclone.service";
|
||||
# };
|
||||
# };
|
||||
# services."backup-rclone" =
|
||||
# let
|
||||
# conf = config.age.secrets.roam-rclone-conf.path;
|
||||
# in
|
||||
# {
|
||||
# script = ''
|
||||
# ${pkgs.rclone}/bin/rclone --config ${conf} copy /home/hd/Documents odc:Documents
|
||||
# ${pkgs.rclone}/bin/rclone --config ${conf} copy /git odc:git
|
||||
# '';
|
||||
# path = [ pkgs.rclone ];
|
||||
# serviceConfig = {
|
||||
# Type = "oneshot";
|
||||
# User = "root";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# }
|
||||
{
|
||||
age.secrets.roam-rclone-conf = {
|
||||
file = secrets.roam."rclone-conf.age";
|
||||
mode = "440";
|
||||
owner = "root";
|
||||
group = "root";
|
||||
};
|
||||
|
||||
systemd = {
|
||||
timers."backup-rclone" = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
Persistent = true;
|
||||
Unit = "backup-rclone.service";
|
||||
};
|
||||
};
|
||||
services."backup-rclone" =
|
||||
let
|
||||
conf = config.age.secrets.roam-rclone-conf.path;
|
||||
in
|
||||
{
|
||||
script = ''
|
||||
${pkgs.rclone}/bin/rclone --config ${conf} copy /home/hd/Documents odc:Documents
|
||||
${pkgs.rclone}/bin/rclone --config ${conf} copy /git odc:git
|
||||
'';
|
||||
path = [ pkgs.rclone ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "root";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
} # TODO: Backups for new Syncthing solution
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ in
|
|||
};
|
||||
cgit."git" = {
|
||||
group = "git";
|
||||
enable = true;
|
||||
enable = false; # FIXME: find out what breaks here
|
||||
scanPath = gitpath;
|
||||
nginx.virtualHost = cgit-host;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ let
|
|||
folders-all = {
|
||||
documents = {
|
||||
id = "documents-hd";
|
||||
path = if is-server then "/data/sync/documents-hd" else "/home/hd/Documents";
|
||||
path = if is-server then "/data/sync/documents-hd" else "/home/hd/Sync";
|
||||
type = if is-server then "receiveencrypted" else "sendreceive";
|
||||
# all clients (desktops + servers) that have are a synthing peer but
|
||||
# with untrusted servers
|
||||
|
|
@ -47,7 +47,7 @@ let
|
|||
folders-desktop = {
|
||||
supernote-note = rec {
|
||||
id = "supernote-note";
|
||||
path = if is-server then "/data/sync/${id}" else "/home/hd/Documents/Supernote/Notizen";
|
||||
path = if is-server then "/data/sync/${id}" else "/home/hd/Sync/Supernote/Notizen";
|
||||
type = "sendreceive";
|
||||
devices = desktop-devices ++ [ "supernote" ];
|
||||
versioning = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue