Add vaultwarden
diff --git a/modules/vaultwarden.nix b/modules/vaultwarden.nix
index d209813..771f16c 100644
--- a/modules/vaultwarden.nix
+++ b/modules/vaultwarden.nix
@@ -1,4 +1,5 @@
-{ base, pkgs, drive_paths, lib, config, ... }: {
+{ base, pkgs, drive_paths, lib, config, ... }:
+lib.recursiveUpdate {
environment.systemPackages = with pkgs; [ vaultwarden ];
services.vaultwarden.enable = true;
@@ -16,7 +17,7 @@
}))
builtins.listToAttrs
];
-} // (
+} (
let
isDerived = base != null;
in
@@ -26,7 +27,7 @@
then
with lib;
let
- cfg = services.vaultwarden;
+ cfg = config.services.vaultwarden;
vaultwarden_config = {
# Server Settings
@@ -39,12 +40,13 @@
SIGNUPS_ALLOWED = false;
INVITATIONS_ALLOWED = true;
SIGNUPS_DOMAINS_WHITELIST = "clicks.codes,coded.codes,thecoded.prof,starrysky.fyi,hopescaramels.com,pinea.dev";
+ SIGNUPS_VERIFY = true;
- RSA_KEY_FILENAME = "${drive_paths.External1000SSD}/bitwarden/rsa_key";
- ICON_CACHE_FOLDER = "${drive_paths.External1000SSD}/bitwarden/icon_cache";
- ATTACHMENTS_FOLDER = "${drive_paths.External4000HDD}/bitwarden/attachments";
- SENDS_FOLDER = "${drive_paths.External4000HDD}/bitwarden/sends";
- TMP_FOLDER = "${drive_paths.External4000HDD}/bitwarden/tmp";
+ RSA_KEY_FILENAME = "${drive_paths.External1000SSD.path}/bitwarden/rsa_key";
+ ICON_CACHE_FOLDER = "${drive_paths.External1000SSD.path}/bitwarden/icon_cache";
+ ATTACHMENTS_FOLDER = "${drive_paths.External4000HDD.path}/bitwarden/attachments";
+ SENDS_FOLDER = "${drive_paths.External4000HDD.path}/bitwarden/sends";
+ TMP_FOLDER = "${drive_paths.External4000HDD.path}/bitwarden/tmp";
DISABLE_2FA_REMEMBER = true;
@@ -53,17 +55,18 @@
# Database Settings
- DATABASE_URL = "postgresql://vaultwarden:!!clicks_bitwarden_db_secret!!@127.0.0.1:${config.services.postgresql.port}/vaultwarden";
+ DATABASE_URL =
+ "postgresql://vaultwarden:!!clicks_bitwarden_db_secret!!@127.0.0.1:${toString config.services.postgresql.port}/vaultwarden";
# Mail Settings
- SMTP_HOST = "127.0.0.1";
+ SMTP_HOST = "mail.clicks.codes";
SMTP_FROM = "bitwarden@clicks.codes";
SMTP_FROM_NAME = "Clicks Bitwarden";
SMTP_SECURITY = "starttls";
SMTP_PORT = 587;
- SMTP_USERNAME = "FILL_ME_IN";
+ SMTP_USERNAME = "bitwarden@clicks.codes";
SMTP_PASSWORD = "!!SMTP_PASSWORD!!";
REQUIRE_DEVICE_EMAIL = true;