Update
This commit is contained in:
parent
24de104139
commit
ca8abfde1c
@ -1,7 +1,7 @@
|
||||
{ pkgs, config, ... }:
|
||||
let variable = import ../../variables.nix;
|
||||
in {
|
||||
imports = [ ./hardware-configuration.nix ./openssh.nix ./nextcloud.nix ];
|
||||
imports = [ ./hardware-configuration.nix ./openssh.nix ./nextcloud.nix ./firewall.nix ./nginx.nix ];
|
||||
|
||||
boot = {
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
|
7
hosts/server/firewall.nix
Normal file
7
hosts/server/firewall.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 22 ];
|
||||
};
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
{ pkgs, ... }: {
|
||||
{ pkgs, config, ... }: {
|
||||
|
||||
environment.systemPackages = with pkgs; [ nextcloud29 ];
|
||||
|
||||
@ -7,27 +7,12 @@
|
||||
package = pkgs.nextcloud29;
|
||||
hostName = "localhost";
|
||||
config.adminpassFile = "/etc/nextcloudpwd";
|
||||
nginx.enable = true;
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
|
||||
# Use recommended settings
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
|
||||
# Only allow PFS-enabled ciphers with AES256
|
||||
sslCiphers = "AES256+EECDH:AES256+EDH:!aNULL";
|
||||
|
||||
# Setup Nextcloud virtual host to listen on ports
|
||||
virtualHosts = {
|
||||
|
||||
"localhost" = { };
|
||||
};
|
||||
};
|
||||
services.nginx.virtualHosts."localhost".listen = [{
|
||||
addr = "127.0.0.1";
|
||||
port = 8080;
|
||||
}];
|
||||
}
|
||||
|
11
hosts/server/nginx.nix
Normal file
11
hosts/server/nginx.nix
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
};
|
||||
|
||||
networking.firewall = { allowedTCPPorts = [ 80 443 ]; };
|
||||
}
|
Loading…
Reference in New Issue
Block a user