ma bitwarden: init for gum.r
This commit is contained in:
parent
a05435c26a
commit
8911431f8c
@ -104,7 +104,8 @@ in {
|
|||||||
# sharing
|
# sharing
|
||||||
<stockholm/makefu/2configs/share/gum.nix> # samba sahre
|
<stockholm/makefu/2configs/share/gum.nix> # samba sahre
|
||||||
<stockholm/makefu/2configs/torrent.nix>
|
<stockholm/makefu/2configs/torrent.nix>
|
||||||
<stockholm/makefu/2configs/sickbeard>
|
# <stockholm/makefu/2configs/sickbeard>
|
||||||
|
<stockholm/makefu/2configs/bitwarden.nix>
|
||||||
|
|
||||||
{ nixpkgs.config.allowUnfree = true; }
|
{ nixpkgs.config.allowUnfree = true; }
|
||||||
#<stockholm/makefu/2configs/retroshare.nix>
|
#<stockholm/makefu/2configs/retroshare.nix>
|
||||||
@ -117,7 +118,9 @@ in {
|
|||||||
<stockholm/makefu/2configs/vpn/openvpn-server.nix>
|
<stockholm/makefu/2configs/vpn/openvpn-server.nix>
|
||||||
# <stockholm/makefu/2configs/vpn/vpnws/server.nix>
|
# <stockholm/makefu/2configs/vpn/vpnws/server.nix>
|
||||||
<stockholm/makefu/2configs/binary-cache/server.nix>
|
<stockholm/makefu/2configs/binary-cache/server.nix>
|
||||||
|
{ makefu.backup.server.repo = "/var/backup/borg"; }
|
||||||
<stockholm/makefu/2configs/backup/server.nix>
|
<stockholm/makefu/2configs/backup/server.nix>
|
||||||
|
<stockholm/makefu/2configs/backup/state.nix>
|
||||||
<stockholm/makefu/2configs/iodined.nix>
|
<stockholm/makefu/2configs/iodined.nix>
|
||||||
<stockholm/makefu/2configs/bitlbee.nix>
|
<stockholm/makefu/2configs/bitlbee.nix>
|
||||||
<stockholm/makefu/2configs/wireguard/server.nix>
|
<stockholm/makefu/2configs/wireguard/server.nix>
|
||||||
|
46
makefu/2configs/bitwarden.nix
Normal file
46
makefu/2configs/bitwarden.nix
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
|
port = 8812;
|
||||||
|
in {
|
||||||
|
services.bitwarden_rs = {
|
||||||
|
enable = true;
|
||||||
|
dbBackend = "postgresql";
|
||||||
|
config.signups_allowed = false;
|
||||||
|
config.rocketPort = port;
|
||||||
|
config.domain = "https://bw.euer.krebsco.de";
|
||||||
|
#config.databaseUrl = "postgresql://bitwardenuser:${dbPassword}@localhost/bitwarden";
|
||||||
|
config.databaseUrl = "postgresql:///bitwarden";
|
||||||
|
config.websocket_enabled = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.bitwarden_rs.after = [ "postgresql.service" ];
|
||||||
|
|
||||||
|
services.postgresql = {
|
||||||
|
enable = true;
|
||||||
|
ensureDatabases = [ "bitwarden" ];
|
||||||
|
ensureUsers = [ { name = "bitwarden_rs"; ensurePermissions."DATABASE bitwarden" = "ALL PRIVILEGES"; } ];
|
||||||
|
#initialScript = pkgs.writeText "postgresql-init.sql" ''
|
||||||
|
# CREATE DATABASE bitwarden;
|
||||||
|
# CREATE USER bitwardenuser WITH PASSWORD '${dbPassword}';
|
||||||
|
# GRANT ALL PRIVILEGES ON DATABASE bitwarden TO bitwardenuser;
|
||||||
|
#'';
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."bw.euer.krebsco.de" ={
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://localhost:8812";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
locations."/notifications/hub" = {
|
||||||
|
proxyPass = "http://localhost:3012";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
locations."/notifications/hub/negotiate" = {
|
||||||
|
proxyPass = "http://localhost:8812";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user