diff options
author | Zhongheng Liu <z.liu@outlook.com.gr> | 2024-12-17 00:53:10 +0200 |
---|---|---|
committer | Zhongheng Liu <z.liu@outlook.com.gr> | 2024-12-17 00:53:10 +0200 |
commit | 64e476798d7bb4a93813a3f2ceed77668275fff0 (patch) | |
tree | 42c912f4e6dca3f2bebb9e27435f391d8ececce3 | |
parent | 77f1155518d95c83a644eef379423c53eeb2e9c7 (diff) | |
download | nixos-configuration-64e476798d7bb4a93813a3f2ceed77668275fff0.tar.gz nixos-configuration-64e476798d7bb4a93813a3f2ceed77668275fff0.tar.bz2 nixos-configuration-64e476798d7bb4a93813a3f2ceed77668275fff0.zip |
feat: experimenting with custom local hosts
-rw-r--r-- | nixos/custom-hosts.nix | 13 | ||||
-rw-r--r-- | nixos/services/nginx.service.nix | 11 |
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]; |