From 8ca2cc66ba9bb87f1c39ce879807964cc1c3b766 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 27 Feb 2021 15:19:43 -0500 Subject: [PATCH] mkdir /run/backups/bitwarden_rs Since the service fails to do it itself. --- modules/services/bitwarden.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/services/bitwarden.nix b/modules/services/bitwarden.nix index 187c88c2..1de1ac26 100644 --- a/modules/services/bitwarden.nix +++ b/modules/services/bitwarden.nix @@ -22,5 +22,13 @@ in { port = 80,443,8002 maxretry = 5 ''; + + # HACK services.bitwarden_rs errors about permissions trying to create + # backupDir in /run/backups, so we do it for it. + system.activationScripts.bitwardenCreateDirs = '' + DIR="${config.services.bitwarden_rs.backupDir}" + mkdir -m 750 -p "$DIR" || true + chown bitwarden_rs:bitwarden_rs "$DIR" + ''; }; }