TheCodedProf | 85256bc | 2023-06-13 13:02:53 -0400 | [diff] [blame^] | 1 | { pkgs, ... }: { |
TheCodedProf | aec8c45 | 2023-06-12 18:26:46 -0400 | [diff] [blame] | 2 | environment.systemPackages = with pkgs; [ vaultwarden ]; |
| 3 | |
| 4 | services.vaultwarden.enable = true; |
| 5 | services.vaultwarden.dbBackend = "postgresql"; |
| 6 | |
| 7 | services.vaultwarden.config = { |
| 8 | # Server Settings |
| 9 | DOMAIN = "https://passwords.clicks.codes"; |
| 10 | ROCKET_ADDRESS = "127.0.0.1"; |
| 11 | ROCKET_PORT = 8452; |
| 12 | |
| 13 | |
| 14 | # General Settings |
| 15 | SIGNUPS_ALLOWED=false; |
| 16 | INVITATIONS_ALLOWED=true; |
| 17 | SIGNUPS_DOMAINS_WHITELIST="clicks.codes,coded.codes,thecoded.prof,starrysky.fyi,hopescaramels.com,pinea.dev"; |
| 18 | |
| 19 | # TODO: Set folder locations for storing data. |
| 20 | # RSA_KEY_FILENAME=data/rsa_key |
| 21 | # ICON_CACHE_FOLDER=data/icon_cache |
| 22 | # ATTACHMENTS_FOLDER=data/attachments |
| 23 | # SENDS_FOLDER=data/sends |
| 24 | # TMP_FOLDER=data/tmp |
| 25 | |
| 26 | DISABLE_2FA_REMEMBER=true; |
| 27 | |
| 28 | # Admin Account |
| 29 | ADMIN_TOKEN="$argon2id$v=19$m=100,t=2,p=10$dWVoN1llNTFpVHRXZXNicA$oXSZOeoCRxgA6aXBmRj0Ow"; |
| 30 | |
| 31 | |
| 32 | # Database Settings |
| 33 | DATABASE_URL="postgresql://FILL_ME_IN:FILL_ME_IN@127.0.0.1:FILL_ME_IN/bitwarden"; |
| 34 | |
| 35 | |
| 36 | # Mail Settings |
| 37 | SMTP_HOST = "127.0.0.1"; |
| 38 | SMTP_FROM = "bitwarden@clicks.codes"; |
| 39 | SMTP_FROM_NAME = "Clicks Bitwarden"; |
| 40 | SMTP_SECURITY = "starttls"; |
| 41 | SMTP_PORT = 587; |
| 42 | |
| 43 | SMTP_USERNAME="FILL_ME_IN"; |
| 44 | SMTP_PASSWORD="FILL_ME_IN"; |
| 45 | |
| 46 | REQUIRE_DEVICE_EMAIL=true; |
| 47 | |
| 48 | |
| 49 | # YubiKey Settings |
TheCodedProf | 85256bc | 2023-06-13 13:02:53 -0400 | [diff] [blame^] | 50 | YUBICO_CLIENT_ID="89788"; |
TheCodedProf | aec8c45 | 2023-06-12 18:26:46 -0400 | [diff] [blame] | 51 | YUBICO_SECRET_KEY="FILL_ME_IN"; |
| 52 | |
| 53 | |
| 54 | # TODO: Buy a license |
| 55 | # HIBP Settings |
| 56 | # HIBP_API_KEY="FILL_ME_IN"; |
| 57 | }; |
| 58 | } |