From 4bd6004b8901b68bdc2a5f77824326e77dfd89b6 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Mon, 11 Mar 2024 12:33:40 +0100 Subject: [PATCH] paperless and postgresql get a synchronized dataset. --- nixos/machines/chungus/disko-syncoid.nix | 11 ++++++++++- .../hardware-configuration/disko-config.nix | 18 ++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/nixos/machines/chungus/disko-syncoid.nix b/nixos/machines/chungus/disko-syncoid.nix index dca1ab1..3f9edd7 100644 --- a/nixos/machines/chungus/disko-syncoid.nix +++ b/nixos/machines/chungus/disko-syncoid.nix @@ -4,9 +4,18 @@ enable = true; commands.service2 = { source = "zroot/services2"; - target = "zraid/mirror/services2"; + target = "zraid/mirror/services2"; # needs to be created but not named in disko-config.nix + }; + commands.paperless = { + source = "zroot/paperless"; + target = "zraid/mirror/paperless"; # needs to be created but not named in disko-config.nix + }; + commands.postgresql = { + source = "zroot/postgresql"; + target = "zraid/mirror/postgresql"; # needs to be created but not named in disko-config.nix }; commonArgs = [ + # Does not create new snapshot, only transfers existing "--no-sync-snap" ]; }; diff --git a/nixos/machines/chungus/hardware-configuration/disko-config.nix b/nixos/machines/chungus/hardware-configuration/disko-config.nix index e54e6ea..423f25d 100644 --- a/nixos/machines/chungus/hardware-configuration/disko-config.nix +++ b/nixos/machines/chungus/hardware-configuration/disko-config.nix @@ -105,6 +105,24 @@ in "com.sun:auto-snapshot:daily" = toString true; }; }; + "paperless" = { + type = "zfs_fs"; + mountpoint = "/var/lib/paperless"; + options = { + mountpoint = "legacy"; + compression = "lz4"; + "com.sun:auto-snapshot:daily" = toString true; + }; + }; + "postgresql" = { + type = "zfs_fs"; + mountpoint = "/var/lib/postgresql"; + options = { + mountpoint = "legacy"; + compression = "lz4"; + "com.sun:auto-snapshot:daily" = toString true; + }; + }; }; };