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:
parent
38a89b05a3
commit
d77fcaa826
4 changed files with 21 additions and 3 deletions
|
@ -1,7 +1,6 @@
|
|||
{config, ...}: {
|
||||
networking = {
|
||||
inherit (config.repo.secrets.local.networking) hostId;
|
||||
wireless.iwd.enable = true;
|
||||
};
|
||||
|
||||
boot.initrd.systemd.network = {
|
||||
|
|
|
@ -112,8 +112,18 @@ in {
|
|||
};
|
||||
inherit (cfg) environment;
|
||||
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 = {
|
||||
subuser = "paperless";
|
||||
paths = [paperlessBackupDir];
|
||||
|
|
|
@ -146,9 +146,9 @@ in {
|
|||
extraConfig = lib.concatLines [
|
||||
# Show the server host name in the printer comment box in print manager
|
||||
# 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.
|
||||
"netbios name = my-nas"
|
||||
"netbios name = SambaOelig"
|
||||
# Disable netbios support. We don't need to support browsing since all
|
||||
# clients hardcode the host and share names.
|
||||
"disable netbios = yes"
|
||||
|
|
|
@ -84,6 +84,15 @@ in {
|
|||
RestartSec = "600"; # Retry every 10 minutes
|
||||
};
|
||||
|
||||
environment.persistence."/state".directories = [
|
||||
{
|
||||
directory = config.services.vaultwarden.backupDir;
|
||||
user = "vaultwarden";
|
||||
group = "vaultwarden";
|
||||
mode = "0700";
|
||||
}
|
||||
];
|
||||
|
||||
backups.storageBoxes.dusk = {
|
||||
subuser = "vaultwarden";
|
||||
paths = [config.services.vaultwarden.backupDir];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue