Switch to nixfmt

This commit is contained in:
Filippo Berto 2023-01-19 19:53:17 +01:00
parent 44794e2c3d
commit 5b974a203b
Signed by: bertof
GPG key ID: 9DBF7E6A1D2CE9ED
63 changed files with 990 additions and 946 deletions

View file

@ -13,7 +13,10 @@ with lib; {
};
};
console = { font = "Lat2-Terminus16"; keyMap = "it"; };
console = {
font = "Lat2-Terminus16";
keyMap = "it";
};
environment = {
pathsToLink = [ "/share/zsh" ];
@ -23,8 +26,14 @@ with lib; {
i18n.defaultLocale = "it_IT.UTF-8";
programs = {
gnupg.agent = { enable = true; enableSSHSupport = true; };
zsh = { enable = true; syntaxHighlighting.enable = true; };
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
zsh = {
enable = true;
syntaxHighlighting.enable = true;
};
};
networking.hostName = "baldur";
@ -48,33 +57,61 @@ with lib; {
ssh = "${pkgs.avahi}/etc/avahi/services/ssh.service";
};
};
fail2ban = { enable = true; bantime-increment.enable = true; };
fail2ban = {
enable = true;
bantime-increment.enable = true;
};
nginx = {
enable = true;
recommendedProxySettings = true;
recommendedOptimisation = true;
recommendedGzipSettings = true;
recommendedTlsSettings = true;
virtualHosts =
let
ssl = { enableACME = true; forceSSL = true; };
loki = "172.23.254.55";
in
{
"unimi.bertof.net" = ssl // { locations."/".extraConfig = "rewrite ^/(.*)$ https://homes.di.unimi.it/berto/$1 redirect ;"; };
"home-assistant.bertof.net" = ssl // {
locations."/" = { proxyPass = "http://${loki}:8123/"; proxyWebsockets = true; };
extraConfig = ''
proxy_pass_header Authorization;
proxy_buffering off;
'';
};
"radarr.bertof.net" = ssl // { locations."/" = { proxyPass = "http://${loki}:7878/"; proxyWebsockets = true; }; };
"sonarr.bertof.net" = ssl // { locations."/" = { proxyPass = "http://${loki}:8989/"; proxyWebsockets = true; }; };
"jellyfin.bertof.net" = ssl // { locations."/" = { proxyPass = "http://${loki}:8096/"; proxyWebsockets = true; }; };
virtualHosts = let
ssl = {
enableACME = true;
forceSSL = true;
};
loki = "172.23.254.55";
in {
"unimi.bertof.net" = ssl // {
locations."/".extraConfig =
"rewrite ^/(.*)$ https://homes.di.unimi.it/berto/$1 redirect ;";
};
"home-assistant.bertof.net" = ssl // {
locations."/" = {
proxyPass = "http://${loki}:8123/";
proxyWebsockets = true;
};
extraConfig = ''
proxy_pass_header Authorization;
proxy_buffering off;
'';
};
"radarr.bertof.net" = ssl // {
locations."/" = {
proxyPass = "http://${loki}:7878/";
proxyWebsockets = true;
};
};
"sonarr.bertof.net" = ssl // {
locations."/" = {
proxyPass = "http://${loki}:8989/";
proxyWebsockets = true;
};
};
"jellyfin.bertof.net" = ssl // {
locations."/" = {
proxyPass = "http://${loki}:8096/";
proxyWebsockets = true;
};
};
};
};
openssh = {
enable = true;
openFirewall = true;
};
openssh = { enable = true; openFirewall = true; };
};
security.acme = {