aboutsummaryrefslogtreecommitdiff
path: root/nixos
diff options
context:
space:
mode:
Diffstat (limited to 'nixos')
-rw-r--r--nixos/custom-hosts.nix13
-rw-r--r--nixos/services/nginx.service.nix11
2 files changed, 19 insertions, 5 deletions
diff --git a/nixos/custom-hosts.nix b/nixos/custom-hosts.nix
new file mode 100644
index 0000000..942bc4f
--- /dev/null
+++ b/nixos/custom-hosts.nix
@@ -0,0 +1,13 @@
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}: {
+ networking.extraHosts = ''
+ # home IP mapping
+
+ 192.168.2.1 router.home
+ 192.168.2.2 server.home
+ '';
+}
diff --git a/nixos/services/nginx.service.nix b/nixos/services/nginx.service.nix
index 798f078..bd8b2ef 100644
--- a/nixos/services/nginx.service.nix
+++ b/nixos/services/nginx.service.nix
@@ -1,4 +1,8 @@
-{pkgs, ...}: {
+{
+ pkgs,
+ config,
+ ...
+}: {
services.nginx = {
enable = true;
virtualHosts."localhost" = {
@@ -11,10 +15,7 @@
'';
};
};
- listenAddresses = [
- "127.0.0.1"
- "[::1]"
- ];
+ listenAddresses = ["127.0.0.1" "[::1]"];
};
};
networking.firewall.allowedTCPPorts = [80];