move nginx to service

This commit is contained in:
Jörg Thalheim 2021-03-04 11:02:47 +01:00
parent f1fad4f800
commit c44fa9bc06
No known key found for this signature in database
GPG key ID: B3F5D81B0C6967C4
3 changed files with 11 additions and 17 deletions

View file

@ -14,6 +14,7 @@
../profiles/common.nix
../services/docker.nix
../services/hound
../services/nginx.nix
];
# /boot is a mirror raid
@ -30,11 +31,6 @@
# Emulate armv7 until we have proper builders
boot.binfmt.emulatedSystems = [ "armv7l-linux" ];
networking.firewall = {
# for Nginx
allowedTCPPorts = [ 443 80 ];
};
systemd.network = {
enable = true;
networks."eth0".extraConfig = ''
@ -48,10 +44,6 @@
'';
};
# nginx is being used as the frontend HTTP server for all the services
# running on the box
services.nginx.enable = true;
services.cron.enable = true;
services.cron.systemCronJobs = [
# record that this machine is alive

View file

@ -8,6 +8,7 @@
./nixpkgs-update.nix
../profiles/common.nix
../services/nginx.nix
];
# /boot is a mirror raid
@ -32,14 +33,6 @@
];
};
# nginx is being used as the frontend HTTP server for all the services
# running on the box
services.nginx.enable = true;
networking.firewall = {
# for Nginx
allowedTCPPorts = [ 443 80 ];
};
boot.kernelPackages = pkgs.linuxPackages_latest;
system.stateVersion = "20.09";

9
services/nginx.nix Normal file
View file

@ -0,0 +1,9 @@
{ config, lib, pkgs, ... }:
{
# nginx is being used as the frontend HTTP server for all the services
# running on the box
services.nginx.enable = true;
networking.firewall.allowedTCPPorts = [ 443 80 ];
}