From b962fe61837a9d6050a176e271b8025f5764935f Mon Sep 17 00:00:00 2001 From: coolneng Date: Thu, 8 Jun 2023 18:33:01 +0200 Subject: [PATCH] Specify ZFS datasets dependencies for each service --- modules/communication.nix | 7 +++++++ modules/containers.nix | 4 ++-- modules/datasync.nix | 5 ++--- modules/devops.nix | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/modules/communication.nix b/modules/communication.nix index 05f602c..9f00aa2 100644 --- a/modules/communication.nix +++ b/modules/communication.nix @@ -51,6 +51,13 @@ in { }; }; + # Start dendrite after config files are mounted + systemd.services.dendrite.unitConfig.RequiresMountsFor = [ + /var/lib/matrix-as-facebook + /var/lib/matrix-as-signal + /var/lib/matrix-as-telegram + ]; + # Matrix bridges services.matrix-appservices = { homeserver = "dendrite"; diff --git a/modules/containers.nix b/modules/containers.nix index d454c1f..16bd804 100644 --- a/modules/containers.nix +++ b/modules/containers.nix @@ -57,7 +57,7 @@ # Start services after ZFS mount systemd.services.podman-mongodb.unitConfig.RequiresMountsFor = - [ "vault.mount" ]; + [ /vault/mongodb ]; systemd.services.podman-mqtt2prometheus.unitConfig.RequiresMountsFor = - [ "vault.mount" ]; + [ /vault/mqtt2prometheus ]; } diff --git a/modules/datasync.nix b/modules/datasync.nix index f1378ad..857ae09 100644 --- a/modules/datasync.nix +++ b/modules/datasync.nix @@ -99,8 +99,7 @@ # Start services after ZFS mount systemd.services.syncthing.unitConfig.RequiresMountsFor = - [ "vault-syncthing.mount" ]; - systemd.services.radicale.unitConfig.RequiresMountsFor = - [ "vault-radicale.mount" ]; + [ /vault/syncthing ]; + systemd.services.radicale.unitConfig.RequiresMountsFor = [ /vault/radicale ]; } diff --git a/modules/devops.nix b/modules/devops.nix index da2bc1b..9df123f 100644 --- a/modules/devops.nix +++ b/modules/devops.nix @@ -25,5 +25,5 @@ }; # Start services after ZFS mount - systemd.services.gitea.unitConfig.RequiresMountsFor = [ "vault-git.mount" ]; + systemd.services.gitea.unitConfig.RequiresMountsFor = [ /vault/git ]; }