Skip to content

Commit

Permalink
networking: module for static names
Browse files Browse the repository at this point in the history
* based on decisions to use static names over internal DNS
  #427

Signed-off-by: Ville Ilvonen <ville.ilvonen@unikie.com>
  • Loading branch information
vilvo committed Apr 29, 2024
1 parent be01b6d commit 7a70f13
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/common/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
./version
./virtualization/docker.nix
./systemd
./networking
];
}
7 changes: 7 additions & 0 deletions modules/common/networking/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copyright 2022-2024 TII (SSRC) and the Ghaf contributors
# SPDX-License-Identifier: Apache-2.0
{
imports = [
./hosts.nix
];
}
17 changes: 17 additions & 0 deletions modules/common/networking/hosts.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2022-2024 TII (SSRC) and the Ghaf contributors
# SPDX-License-Identifier: Apache-2.0
_: {
environment.etc.hosts = {
text = ''
127.0.0.1 localhost
192.168.100.1 net-vm
192.168.100.2 log-vm
192.168.100.3 gala-vm
192.168.100.4 chromium-vm
192.168.100.5 zathura-vm
192.168.100.6 element-vm
192.168.100.7 gui-vm
'';
mode = "0440";
};
}

0 comments on commit 7a70f13

Please sign in to comment.