mirror of
https://github.com/Noratrieb/nixos.git
synced 2026-01-14 19:55:08 +01:00
paperless backup
This commit is contained in:
parent
dd036aee17
commit
9c469bbaef
1 changed files with 24 additions and 2 deletions
|
|
@ -233,7 +233,7 @@ in
|
|||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG0n1ikUG9rYqobh7WpAyXrqZqxQoQ2zNJrFPj12gTpP"
|
||||
];
|
||||
extraGroups = [ "wheel" "networkmanager" "audio" "libvirtd" ];
|
||||
extraGroups = [ "wheel" "networkmanager" "audio" "libvirtd" "docker" ];
|
||||
packages = with pkgs; [
|
||||
vscode
|
||||
chromium
|
||||
|
|
@ -248,6 +248,28 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
systemd.services.paperless-ngx-backup = {
|
||||
description = "paperless-ngx data backup to NAS";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "nora";
|
||||
ExecStart = ''
|
||||
${lib.getExe pkgs.rsync} -a -v --delete --exclude=redis /home/nora/.local/share/paperless-ngx/ /mnt/nas/HEY/_Nora/paperless/backup
|
||||
'';
|
||||
};
|
||||
};
|
||||
systemd.timers.paperless-ngx-backup = {
|
||||
description = "paperless-ngx data backup to NAS";
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
Unit = "paperless-ngx-backup.service";
|
||||
OnCalendar = "daily UTC";
|
||||
RandomizedDelaySec = 1800;
|
||||
FixedRandomDelay = true;
|
||||
Persistent = true; # ensure it still runs if the computer was down at the timer of trigger
|
||||
};
|
||||
};
|
||||
|
||||
xdg.mime.defaultApplications = {
|
||||
"text/html" = "firefox.desktop";
|
||||
"x-scheme-handler/http" = "firefox.desktop";
|
||||
|
|
@ -347,9 +369,9 @@ in
|
|||
};
|
||||
podman = {
|
||||
enable = true;
|
||||
dockerCompat = true;
|
||||
defaultNetwork.settings.dns_enabled = true;
|
||||
};
|
||||
docker.enable = true;
|
||||
virtualbox.host = {
|
||||
enable = true;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue