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 = {

View file

@ -1,21 +1,18 @@
{ modulesPath, ... }:
{
imports =
[
(modulesPath + "/profiles/qemu-guest.nix")
];
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "virtio_blk" ];
boot.initrd.availableKernelModules =
[ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "virtio_blk" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{
device = "/dev/disk/by-uuid/7fa05ac4-8e10-4994-bb7d-4be88e4a6696";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/7fa05ac4-8e10-4994-bb7d-4be88e4a6696";
fsType = "ext4";
};
swapDevices = [ ];

View file

@ -5,9 +5,7 @@
layout = "it";
options = [ "terminate:ctrl_alt_bksp" "compose:rctrl" "grp:menu_toggle" ];
};
packages = with pkgs; [
nix-prefetch-scripts
];
packages = with pkgs; [ nix-prefetch-scripts ];
};
imports = [
../hm_modules/__basic.nix