hosts/ao: finish bitwarden config

This commit is contained in:
Henrik Lissner 2020-12-19 08:05:05 -05:00
parent 9d257c8e55
commit 807b76e640
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 39 additions and 13 deletions

View file

@ -16,6 +16,7 @@ with lib.my;
services.ssh.enable = true; services.ssh.enable = true;
services.nginx.enable = true; services.nginx.enable = true;
services.gitea.enable = true; services.gitea.enable = true;
services.bitwarden.enable = true;
# services.syncthing.enable = true; # services.syncthing.enable = true;
theme.active = "alucard"; theme.active = "alucard";
@ -31,8 +32,11 @@ with lib.my;
virtualHosts = { virtualHosts = {
"v0.io" = { "v0.io" = {
default = true; default = true;
enableACME = true;
forceSSL = true; forceSSL = true;
enableACME = true;
extraConfig = ''
client_max_body_size 128M;
'';
locations."/" = { locations."/" = {
proxyPass = "https://192.168.1.3:8001"; proxyPass = "https://192.168.1.3:8001";
extraConfig = '' extraConfig = ''
@ -42,15 +46,33 @@ with lib.my;
}; };
}; };
"git.v0.io" = { "git.v0.io" = {
enableACME = true;
forceSSL = true; forceSSL = true;
enableACME = true;
locations."/".proxyPass = "http://127.0.0.1:3000"; locations."/".proxyPass = "http://127.0.0.1:3000";
}; };
# "p.v0.io" = { "p.v0.io" = {
# enableACME = true; forceSSL = true;
# forceSSL = true; enableACME = true;
# locations."/".proxyPass = http://127.0.0.1:9001; locations."/" = {
# }; proxyPass = "http://127.0.0.1:8000";
extraConfig = ''
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
'';
};
locations."/notifications/hub" = {
proxyPass = "http://127.0.0.1:3012";
extraConfig = ''
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
'';
};
locations."/notifications/hub/negotiate" = {
proxyPass = "http://127.0.0.1:8001";
};
};
}; };
}; };
@ -59,7 +81,7 @@ with lib.my;
certs = let email = "henrik@lissner.net"; in { certs = let email = "henrik@lissner.net"; in {
"v0.io".email = email; "v0.io".email = email;
"git.v0.io".email = email; "git.v0.io".email = email;
# "p.v0.io".email = email; "p.v0.io".email = email;
}; };
}; };
@ -70,12 +92,17 @@ with lib.my;
settings.server.SSH_DOMAIN = "v0.io"; settings.server.SSH_DOMAIN = "v0.io";
}; };
services.bitwarden_rs.config = {
signupsAllowed = false;
domain = "https://p.v0.io";
httpPort = 8002;
};
services.fail2ban = { services.fail2ban = {
enable = true; enable = true;
ignoreIP = [ "127.0.0.1/8" "192.168.1.0/24" ];
jails.DEFAULT = '' jails.DEFAULT = ''
ignoreip = 127.0.0.1/8,192.168.1.0/24
bantime = 3600 bantime = 3600
maxretry = 5
''; '';
jails.sshd = '' jails.sshd = ''
filter = sshd filter = sshd

View file

@ -9,8 +9,7 @@ in {
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
services.bitwarden_rs = { services.bitwarden_rs.enable = true;
enable = true; user.extraGroups = [ "bitwarden_rs" ];
};
}; };
} }