Commit 54faeab1083a
Changed files (1)
systems
aomi
systems/aomi/system.nix
@@ -1,11 +1,17 @@
{
+ lib,
pkgs,
globals,
+ libx,
...
}:
let
machine = globals.machines.aomi;
vpnServer = globals.machines.carthage;
+ hostsEntries = libx.hostConfigs globals.machines;
+ hostsFile = lib.concatStringsSep "\n" (
+ lib.mapAttrsToList (ip: names: "${ip} ${lib.concatStringsSep " " names}") hostsEntries
+ );
in
{
config = {
@@ -59,6 +65,17 @@ in
mode = "0644";
};
+ # /etc/hosts entries for VPN and home network hosts
+ environment.etc.hosts = {
+ text = ''
+ 127.0.0.1 localhost
+ ::1 localhost
+ ${hostsFile}
+ '';
+ mode = "0644";
+ replaceExisting = true;
+ };
+
# Syncthing is managed by home-manager (user service with full folder config)
};
}