mirror of
https://github.com/Noratrieb/nixos.git
synced 2026-01-16 20:55:06 +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 = [
|
openssh.authorizedKeys.keys = [
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG0n1ikUG9rYqobh7WpAyXrqZqxQoQ2zNJrFPj12gTpP"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG0n1ikUG9rYqobh7WpAyXrqZqxQoQ2zNJrFPj12gTpP"
|
||||||
];
|
];
|
||||||
extraGroups = [ "wheel" "networkmanager" "audio" "libvirtd" ];
|
extraGroups = [ "wheel" "networkmanager" "audio" "libvirtd" "docker" ];
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
vscode
|
vscode
|
||||||
chromium
|
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 = {
|
xdg.mime.defaultApplications = {
|
||||||
"text/html" = "firefox.desktop";
|
"text/html" = "firefox.desktop";
|
||||||
"x-scheme-handler/http" = "firefox.desktop";
|
"x-scheme-handler/http" = "firefox.desktop";
|
||||||
|
|
@ -347,9 +369,9 @@ in
|
||||||
};
|
};
|
||||||
podman = {
|
podman = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dockerCompat = true;
|
|
||||||
defaultNetwork.settings.dns_enabled = true;
|
defaultNetwork.settings.dns_enabled = true;
|
||||||
};
|
};
|
||||||
|
docker.enable = true;
|
||||||
virtualbox.host = {
|
virtualbox.host = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue