1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-11 07:10:39 +02:00

fix: make paperless and vaultwarden temporary backup dirs persistent to avoid running out of tmpfs space on backups

This commit is contained in:
oddlama 2024-01-20 20:14:49 +01:00
parent 38a89b05a3
commit d77fcaa826
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
4 changed files with 21 additions and 3 deletions

View file

@ -1,7 +1,6 @@
{config, ...}: { {config, ...}: {
networking = { networking = {
inherit (config.repo.secrets.local.networking) hostId; inherit (config.repo.secrets.local.networking) hostId;
wireless.iwd.enable = true;
}; };
boot.initrd.systemd.network = { boot.initrd.systemd.network = {

View file

@ -112,8 +112,18 @@ in {
}; };
inherit (cfg) environment; inherit (cfg) environment;
requiredBy = ["restic-backups-storage-box-dusk.service"]; requiredBy = ["restic-backups-storage-box-dusk.service"];
before = ["restic-backups-storage-box-dusk.service"];
}; };
environment.persistence."/state".directories = [
{
directory = paperlessBackupDir;
user = "paperless";
group = "paperless";
mode = "0700";
}
];
backups.storageBoxes.dusk = { backups.storageBoxes.dusk = {
subuser = "paperless"; subuser = "paperless";
paths = [paperlessBackupDir]; paths = [paperlessBackupDir];

View file

@ -146,9 +146,9 @@ in {
extraConfig = lib.concatLines [ extraConfig = lib.concatLines [
# Show the server host name in the printer comment box in print manager # Show the server host name in the printer comment box in print manager
# and next to the IPC connection in net view. # and next to the IPC connection in net view.
"server string = my-nas" "server string = SambaOelig"
# Set the NetBIOS name by which the Samba server is known. # Set the NetBIOS name by which the Samba server is known.
"netbios name = my-nas" "netbios name = SambaOelig"
# Disable netbios support. We don't need to support browsing since all # Disable netbios support. We don't need to support browsing since all
# clients hardcode the host and share names. # clients hardcode the host and share names.
"disable netbios = yes" "disable netbios = yes"

View file

@ -84,6 +84,15 @@ in {
RestartSec = "600"; # Retry every 10 minutes RestartSec = "600"; # Retry every 10 minutes
}; };
environment.persistence."/state".directories = [
{
directory = config.services.vaultwarden.backupDir;
user = "vaultwarden";
group = "vaultwarden";
mode = "0700";
}
];
backups.storageBoxes.dusk = { backups.storageBoxes.dusk = {
subuser = "vaultwarden"; subuser = "vaultwarden";
paths = [config.services.vaultwarden.backupDir]; paths = [config.services.vaultwarden.backupDir];