networking: add basic /etc files for networking

This commit is contained in:
Tobias Happ 2021-05-27 18:26:59 +02:00 committed by Alexander Sosedkin
parent 0dec5d4c97
commit cfcb4acf16
2 changed files with 37 additions and 0 deletions

View file

@ -0,0 +1,36 @@
# Copyright (c) 2019-2021, see AUTHORS. Licensed under MIT License, see LICENSE.
{ config, lib, pkgs, ... }:
with lib;
{
###### interface
options = {
};
###### implementation
config = {
environment.etc = {
# /etc/services: TCP/UDP port assignments.
services.source = pkgs.iana-etc + "/etc/services";
# /etc/protocols: IP protocol numbers.
protocols.source = pkgs.iana-etc + "/etc/protocols";
# /etc/hosts: Hostname-to-IP mappings.
hosts.text = ''
127.0.0.1 localhost
::1 localhost
'';
};
};
}