helm/hosts/ao/default.nix

81 lines
1.6 KiB
Nix
Raw Normal View History

# Ao -- my home development and user-facing server
2020-01-12 15:17:17 -08:00
{ config, lib, ... }:
with lib.my;
2020-01-12 15:17:17 -08:00
{
2020-10-26 02:48:12 -07:00
imports = [
../personal.nix
./hardware-configuration.nix
];
2020-01-12 15:17:17 -08:00
## Modules
2020-03-28 22:48:43 -07:00
modules = {
shell.git.enable = true;
shell.zsh.enable = true;
services.ssh.enable = true;
2020-12-18 20:42:24 -08:00
services.nginx.enable = true;
services.gitea.enable = true;
# services.syncthing.enable = true;
theme.active = "alucard";
2020-03-28 22:48:43 -07:00
};
2020-01-17 16:08:43 -08:00
## Local config
2020-01-12 15:17:17 -08:00
networking.networkmanager.enable = true;
# nginx hosts
services.nginx = {
user = config.user.name;
2020-01-12 15:17:17 -08:00
virtualHosts = {
"v0.io" = {
default = true;
enableACME = true;
forceSSL = true;
2020-12-18 20:42:24 -08:00
locations."/".proxyPass = http://192.168.1.3:8000;
2020-01-12 15:17:17 -08:00
};
"git.v0.io" = {
enableACME = true;
forceSSL = true;
locations."/".proxyPass = http://127.0.0.1:3000;
};
2020-12-18 20:42:24 -08:00
# "p.v0.io" = {
# enableACME = true;
# forceSSL = true;
2020-12-18 20:42:24 -08:00
# locations."/".proxyPass = http://127.0.0.1:9001;
# };
2020-01-12 15:17:17 -08:00
};
};
security.acme = {
acceptTerms = true;
certs = let email = "henrik@lissner.net"; in {
"v0.io".email = email;
"git.v0.io".email = email;
2020-12-18 20:42:24 -08:00
# "p.v0.io".email = email;
};
2020-01-12 15:17:17 -08:00
};
services.gitea = {
appName = "V-NOUGHT";
domain = "v0.io";
rootUrl = "https://git.v0.io/";
settings.server.SSH_DOMAIN = "v0.io";
2020-01-12 15:17:17 -08:00
};
2020-01-17 01:22:50 -08:00
services.fail2ban = {
enable = true;
jails.DEFAULT = ''
ignoreip = 127.0.0.1/8,192.168.1.0/24
bantime = 3600
maxretry = 5
'';
jails.sshd = ''
filter = sshd
action = iptables[name=ssh, port=22, protocl=tcp]
enabled = true
'';
};
2020-01-12 15:17:17 -08:00
}