grimm-nixos-laptop/specific/grimmauld-nixos-server/configuration.nix

49 lines
1.1 KiB
Nix
Raw Permalink Normal View History

2024-05-08 21:50:08 +02:00
{
lib,
config,
inputs,
pkgs,
...
}:
2024-05-08 21:49:37 +02:00
let
inherit (config.networking) domain;
2024-05-08 21:50:08 +02:00
in
{
imports = [ ./hardware-configuration.nix ];
2024-05-08 21:49:37 +02:00
2024-05-08 23:08:25 +02:00
boot = {
kernelPackages = pkgs.linuxPackages_latest;
};
2024-05-08 21:50:08 +02:00
networking.firewall.allowedTCPPorts = [
80
443
];
2024-05-08 21:49:37 +02:00
networking.hostName = "grimmauld-nixos-server";
networking.domain = "grimmauld.de";
services.openssh.enable = true;
system.stateVersion = "23.11";
2024-05-08 23:08:25 +02:00
# networking.networkmanager.enable = lib.mkForce false;
2024-05-08 21:49:37 +02:00
services.nginx = {
# package = pkgs.nginxStable.override { openssl = pkgs.libressl; };
enable = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
sslCiphers = "AES256+EECDH:AES256+EDH:!aNULL";
virtualHosts."${domain}" = {
forceSSL = true;
enableACME = lib.mkForce false; # use the correct cert, not some weird one that matrix-synapse module supplies
useACMEHost = domain;
locations."/" = {
2024-05-08 21:50:08 +02:00
root = "/var/www/${domain}";
2024-05-08 21:49:37 +02:00
};
};
};
# users.users.root.openssh.authorizedKeys.keys = (import ./authorizedKeys.nix);
}