Fix and include vaultwarden, syncthing and drivePaths modules
diff --git a/flake.nix b/flake.nix
index 3b81fe7..8575fca 100644
--- a/flake.nix
+++ b/flake.nix
@@ -38,6 +38,7 @@
./modules/dnsmasq.nix
./modules/doas.nix
./modules/docker.nix
+ ./modules/drivePaths.nix
./modules/ecryptfs.nix
./modules/fail2ban.nix
./modules/fuck.nix
@@ -54,7 +55,9 @@
./modules/scalpel.nix
./modules/ssh.nix
./modules/static-ip.nix
+ ./modules/syncthing.nix
./modules/tesseract.nix
+ ./modules/vaultwarden.nix
sops-nix.nixosModules.sops
{
users.mutableUsers = false;
diff --git a/modules/vaultwarden.nix b/modules/vaultwarden.nix
index 091ef50..d209813 100644
--- a/modules/vaultwarden.nix
+++ b/modules/vaultwarden.nix
@@ -1,11 +1,11 @@
-{ pkgs, drive_paths, lib, config, ... }: {
+{ base, pkgs, drive_paths, lib, config, ... }: {
environment.systemPackages = with pkgs; [ vaultwarden ];
services.vaultwarden.enable = true;
services.vaultwarden.dbBackend = "postgresql";
- sops.secrets = lib.pipe [ "ADMIN_TOKEN", "SMTP_PASSWORD", "YUBICO_SECRET_KEY", "HIBP_API_KEY" ] [
- (name: {
+ sops.secrets = lib.pipe [ "ADMIN_TOKEN" "SMTP_PASSWORD" "YUBICO_SECRET_KEY" "HIBP_API_KEY" ] [
+ (map (name: {
inherit name; value = {
mode = "0400";
owner = config.users.users.root.name;
@@ -13,7 +13,7 @@
sopsFile = ../secrets/vaultwarden.json;
format = "json";
};
- })
+ }))
builtins.listToAttrs
];
} // (
@@ -40,9 +40,8 @@
INVITATIONS_ALLOWED = true;
SIGNUPS_DOMAINS_WHITELIST = "clicks.codes,coded.codes,thecoded.prof,starrysky.fyi,hopescaramels.com,pinea.dev";
- # TODO: Set folder locations for storing data.
- RSA_KEY_FILENAME = "${drive_paths.root}/bitwarden/rsa_key";
- ICON_CACHE_FOLDER = "${drive_paths.root}/bitwarden/icon_cache";
+ 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";
diff --git a/variables/drive_paths.nix b/variables/drive_paths.nix
index 3ae3c73..b8b6b7a 100644
--- a/variables/drive_paths.nix
+++ b/variables/drive_paths.nix
@@ -1,5 +1,4 @@
{
- root = "/";
Internal120SSD = {
path = "/mnt/120InternalSSD";
uuid = "3051c23d-143a-4344-8ad9-e0a8cf3b8a3d";