Add adguard home and initial nginx config
nginx currently only forwards to adguard, todo add more
This commit is contained in:
parent
d118c3aed0
commit
d2baf077e8
|
@ -9,14 +9,12 @@
|
|||
./desktop/hyprland.nix
|
||||
./desktop/steam.nix
|
||||
./syncthing/Vanguard.nix
|
||||
./server/adguardhome.nix
|
||||
];
|
||||
|
||||
networking.hostName = "Vanguard"; # Define your hostname.
|
||||
#networking.wireless.networks."LAN LAN Ranch".pskRaw = "d4c31e976456783b61d573ee49c94f93914a81bf1048c2f2e1e166c36bdfcd4a";
|
||||
networking.extraHosts = ''
|
||||
192.168.1.230 Legion
|
||||
'';
|
||||
networking.nameservers = [ "192.168.1.230" ];
|
||||
networking.nameservers = [ "192.168.1.166" ];
|
||||
services.openssh.enable = true;
|
||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
||||
|
||||
|
|
10
server/adguardhome.nix
Normal file
10
server/adguardhome.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [ ./nginx ];
|
||||
services.adguardhome = {
|
||||
enable = true;
|
||||
mutableSettings = true;
|
||||
};
|
||||
services.nginx.virtualHosts."guard.xenia.me.uk" = import ./nginx/sites/adguardhome.nix;
|
||||
networking.firewall.allowedTCPPorts = [ 53 2900 ];
|
||||
}
|
12
server/nginx/default.nix
Normal file
12
server/nginx/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
package = pkgs.nginxMainline;
|
||||
recommendedTlsSettings = lib.mkDefault true;
|
||||
recommendedProxySettings = lib.mkDefault true;
|
||||
recommendedOptimisation = lib.mkDefault true;
|
||||
recommendedGzipSettings = lib.mkDefault true;
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
}
|
5
server/nginx/sites/adguardhome.nix
Normal file
5
server/nginx/sites/adguardhome.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
listen = [{ addr = "0.0.0.0"; port = 80; }];
|
||||
serverName = "guard.xenia.me.uk";
|
||||
locations = { "/" = { proxyPass = "http://localhost:3000"; }; };
|
||||
}
|
Loading…
Reference in a new issue