mirror of
https://github.com/nickolaj-jepsen/nixos.git
synced 2026-01-22 16:16:50 +01:00
feat: add server configuration
This commit is contained in:
parent
0d47ab58f5
commit
9665106633
42 changed files with 4282 additions and 99 deletions
21
hosts/homelab/vaultwarden.nix
Normal file
21
hosts/homelab/vaultwarden.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{config, ...}: let
|
||||
domain = "bitwarden.nickolaj.com";
|
||||
in {
|
||||
services.vaultwarden = {
|
||||
enable = true;
|
||||
config = {
|
||||
DOMAIN = "https://${domain}";
|
||||
SIGNUPS_ALLOWED = false;
|
||||
ROCKET_ADDRESS = "127.0.0.1";
|
||||
ROCKET_PORT = 8222;
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."${domain}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://${toString config.services.vaultwarden.config.ROCKET_ADDRESS}:${toString config.services.vaultwarden.config.ROCKET_PORT}";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue