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,
|
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 = {
|
} # TODO: Backups for new Syncthing solution
|
||||||
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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ in
|
||||||
};
|
};
|
||||||
cgit."git" = {
|
cgit."git" = {
|
||||||
group = "git";
|
group = "git";
|
||||||
enable = true;
|
enable = false; # FIXME: find out what breaks here
|
||||||
scanPath = gitpath;
|
scanPath = gitpath;
|
||||||
nginx.virtualHost = cgit-host;
|
nginx.virtualHost = cgit-host;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ let
|
||||||
folders-all = {
|
folders-all = {
|
||||||
documents = {
|
documents = {
|
||||||
id = "documents-hd";
|
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";
|
type = if is-server then "receiveencrypted" else "sendreceive";
|
||||||
# all clients (desktops + servers) that have are a synthing peer but
|
# all clients (desktops + servers) that have are a synthing peer but
|
||||||
# with untrusted servers
|
# with untrusted servers
|
||||||
|
|
@ -47,7 +47,7 @@ let
|
||||||
folders-desktop = {
|
folders-desktop = {
|
||||||
supernote-note = rec {
|
supernote-note = rec {
|
||||||
id = "supernote-note";
|
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";
|
type = "sendreceive";
|
||||||
devices = desktop-devices ++ [ "supernote" ];
|
devices = desktop-devices ++ [ "supernote" ];
|
||||||
versioning = {
|
versioning = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue