Compare commits

..

3 commits

8 changed files with 62 additions and 51 deletions

View file

@ -58,21 +58,23 @@ in
systemd.tmpfiles.rules = [ "d '${backupDir}' 0700 root root - -" ];
#services.restic.backups = {
# invoiceplane = {
# paths = [
# backupDir
# "/var/lib/invoiceplane/billing.faenix.eu"
# ];
# initialize = true;
# passwordFile = config.age.secrets."restic-password".path;
# # See https://www.hosting.de/blog/verschluesselte-backups-mit-rclone-und-restic-in-nextcloud/
# repository = "rclone:cloud.pub.solar:/backups/InvoicePlane";
# backupPrepareCommand = ''
# PW=$(cat ${config.age.secrets."invoiceplane-db-password".path})
# ${pkgs.mariadb-client}/bin/mariadb-dump --all-databases --password=$PW --user=invoiceplane > "${backupDir}/mariadb-dump.sql"
# '';
# rcloneConfigFile = config.age.secrets."rclone-fae.conf".path;
# };
#};
services.restic.backups = {
invoiceplane = {
paths = [
backupDir
"/var/lib/invoiceplane/billing.faenix.eu"
];
timerConfig = {
OnCalendar = "*-*-* 00:00:00 Etc/UTC";
};
initialize = true;
passwordFile = config.age.secrets."restic-password.age".path;
# See https://www.hosting.de/blog/verschluesselte-backups-mit-rclone-und-restic-in-nextcloud/
repository = "rclone:cloud.pub.solar:/Backups/InvoicePlane";
backupPrepareCommand = ''
${pkgs.mariadb-client}/bin/mariadb-dump --all-databases --user=invoiceplane > "${backupDir}/invoiceplane-mariadb-dump.sql"
'';
rcloneConfigFile = config.age.secrets."fae-rclone.conf.age".path;
};
};
}

View file

@ -79,26 +79,29 @@ in
"d '${backupDir}' 0700 ${psCfg.user.name} users - -"
];
#age.secrets."rclone-fae.conf" = {
# file = "${flake.self}/secrets/rclone-fae.conf.age";
# path = "/root/.config/rclone/rclone.conf";
# mode = "400";
#};
age.secrets."fae-rclone.conf.age" = {
file = "${flake.self}/secrets/fae-rclone.conf.age";
path = "/root/.config/rclone/rclone.conf";
mode = "400";
};
#age.secrets."restic-password" = {
# file = "${flake.self}/secrets/restic-password.age";
# mode = "400";
#};
age.secrets."restic-password.age" = {
file = "${flake.self}/secrets/restic-password.age";
mode = "400";
};
#services.restic.backups = {
# paperless = {
# paths = [ backupDir ];
# initialize = true;
# passwordFile = config.age.secrets."restic-password".path;
# # See https://www.hosting.de/blog/verschluesselte-backups-mit-rclone-und-restic-in-nextcloud/
# repository = "rclone:cloud.pub.solar:/backups/Paperless";
# backupPrepareCommand = "${dataDir}/paperless-manage document_exporter ${backupDir} -c -p";
# rcloneConfigFile = config.age.secrets."rclone-fae.conf".path;
# };
#};
services.restic.backups = {
paperless = {
paths = [ backupDir ];
timerConfig = {
OnCalendar = "*-*-* 01:00:00 Etc/UTC";
};
initialize = true;
passwordFile = config.age.secrets."restic-password.age".path;
# See https://www.hosting.de/blog/verschluesselte-backups-mit-rclone-und-restic-in-nextcloud/
repository = "rclone:cloud.pub.solar:/Backups/Paperless";
backupPrepareCommand = "${dataDir}/paperless-manage document_exporter ${backupDir} -c -p";
rcloneConfigFile = config.age.secrets."fae-rclone.conf.age".path;
};
};
}

View file

@ -17,7 +17,7 @@ in
services.printing.enable = true;
services.printing.browsing = true;
services.printing.browsed.enable = false;
services.printing.browsed.enable = true;
services.printing.listenAddresses = [ "localhost:631" ];
services.printing.defaultShared = lib.mkDefault false;

View file

@ -37,7 +37,6 @@
(import ./nix-index.nix)
(import ./prr.nix)
(import ./neovim-plugins.nix)
(import ./wf-recorder.nix)
];
}
);

View file

@ -1,12 +0,0 @@
final: prev: {
wf-recorder = prev.wf-recorder.overrideAttrs (oldAttrs: rec {
inherit (oldAttrs) pname;
src = prev.fetchFromGitHub {
owner = "ammen99";
repo = pname;
rev = "560bb92d3ddaeb31d7af77d22d01b0050b45bebe";
hash = "sha256-goWNRg286Cp6UUqyJyqk7UysumMCt9GtNpF7O5ahKtI=";
};
version = "unstable-2024-11-05";
});
}

BIN
secrets/fae-rclone.conf.age Normal file

Binary file not shown.

View file

@ -0,0 +1,9 @@
age-encryption.org/v1
-> ssh-ed25519 P2sgew RtTlKjDJLmZla6psMGCLCyGdC528wgKpAGRyjOSr0Xw
z6mXQcJ3EJsm6xdye2RW1UywRzGsw+F7YuBJCu7u97U
-> ssh-ed25519 BVsyTA MX32S4W/JPaZ0fHhvbrv9kfKFzsn0q1sSXCE0dP6GSc
xY3y6IfT10qov1RG/jTqHsvGaVx7TWqhIuPwvCVjD/o
-> piv-p256 xGzyzw A8UHNgwcama6GAq90f76XC1dXEnn4zFCnJnxZFZvLkTR
eJUaZhD9I+IuRwe72xICMrL9KRY5DXoZJdq4RSAC8vw
--- 13DAMF41oXunKtZwXnkW5b/8LOblg+6mq53H/rtm6d8
ƒ^+™B£w‰ÐTßZÁ;ß0ÓVÕwf~:½âà^ ÿ~ ë¯ùO[‰â<_FÑ…øê-{àÝ‚Ù²{|<5A>]ò™©ø…R—ÉÆB-sJ{Š9ÞâçÚ-^É&

View file

@ -31,4 +31,14 @@ in
users.teutat3s
users.teutat3s-5-nfc
];
"fae-rclone.conf.age".publicKeys = [
machines.fae
users.teutat3s
users.teutat3s-5-nfc
];
"restic-password.age".publicKeys = [
machines.fae
users.teutat3s
users.teutat3s-5-nfc
];
}