feat: experimenting with custom local hosts
This commit is contained in:
parent
77f1155518
commit
64e476798d
2 changed files with 19 additions and 5 deletions
13
nixos/custom-hosts.nix
Normal file
13
nixos/custom-hosts.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
networking.extraHosts = ''
|
||||
# home IP mapping
|
||||
|
||||
192.168.2.1 router.home
|
||||
192.168.2.2 server.home
|
||||
'';
|
||||
}
|
|
@ -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];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue