2020-01-12 23:11:02 -08:00
|
|
|
# Ao -- my home development and user-facing server
|
2020-01-12 15:17:17 -08:00
|
|
|
|
2020-10-01 15:46:04 -07: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
|
2021-01-20 00:43:03 -08:00
|
|
|
|
|
|
|
./modules/gitea.nix
|
|
|
|
./modules/bitwarden.nix
|
2020-10-26 02:48:12 -07:00
|
|
|
];
|
2020-01-12 15:17:17 -08:00
|
|
|
|
2021-01-20 00:43:03 -08:00
|
|
|
|
2020-10-01 15:46:04 -07:00
|
|
|
## Modules
|
2020-03-28 22:48:43 -07:00
|
|
|
modules = {
|
2021-01-20 00:43:03 -08:00
|
|
|
shell = {
|
|
|
|
git.enable = true;
|
|
|
|
zsh.enable = true;
|
|
|
|
};
|
|
|
|
services = {
|
|
|
|
fail2ban.enable = true;
|
|
|
|
ssh.enable = true;
|
|
|
|
nginx.enable = true;
|
|
|
|
};
|
2020-10-01 15:46:04 -07:00
|
|
|
|
2020-10-23 17:54:25 -07:00
|
|
|
theme.active = "alucard";
|
2020-03-28 22:48:43 -07:00
|
|
|
};
|
|
|
|
|
2020-01-17 16:08:43 -08:00
|
|
|
|
2020-10-01 15:46:04 -07:00
|
|
|
## Local config
|
2020-01-12 15:17:17 -08:00
|
|
|
networking.networkmanager.enable = true;
|
|
|
|
|
|
|
|
# nginx hosts
|
2021-01-20 00:43:03 -08:00
|
|
|
services.nginx.virtualHosts."v0.io" = {
|
|
|
|
default = true;
|
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
2021-02-13 11:00:38 -08:00
|
|
|
locations."~* \.(?:ico|css|map|js|gif|jpe?g|png|ttf|woff)$".extraConfig = ''
|
|
|
|
access_log off;
|
|
|
|
expires 30d;
|
|
|
|
add_header Pragma public;
|
|
|
|
add_header Cache-Control "public, mustrevalidate, proxy-revalidate";
|
2021-01-20 00:43:03 -08:00
|
|
|
proxy_pass https://kiiro:8001;
|
2021-02-13 11:00:38 -08:00
|
|
|
proxy_buffering off;
|
|
|
|
'';
|
|
|
|
locations."/".extraConfig = ''
|
2021-02-14 10:25:08 -08:00
|
|
|
client_max_body_size 10m;
|
2021-01-20 00:43:03 -08:00
|
|
|
proxy_ssl_server_name on;
|
|
|
|
proxy_pass_header Authorization;
|
2021-02-13 11:00:38 -08:00
|
|
|
proxy_pass https://kiiro:8001;
|
|
|
|
proxy_buffering off;
|
2020-01-17 01:22:50 -08:00
|
|
|
'';
|
|
|
|
};
|
2021-01-20 00:43:03 -08:00
|
|
|
|
|
|
|
security.acme.email = "henrik@lissner.net";
|
2020-01-12 15:17:17 -08:00
|
|
|
}
|