DRY loopback interface, it's the same everywhere

This commit is contained in:
Daniel Barlow
2023-03-07 22:02:24 +00:00
parent 0436025e91
commit fec77a44b5
6 changed files with 30 additions and 73 deletions

View File

@@ -22,16 +22,6 @@ let
ifwait
serviceFns;
in rec {
services.loopback =
let iface = interface { type = "loopback"; device = "lo";};
in bundle {
name = "loopback";
contents = [
(address iface { family = "inet4"; address ="127.0.0.1"; prefixLength = 8;})
(address iface { family = "inet6"; address ="::1"; prefixLength = 128;})
];
};
boot = {
tftp = {
enable = true;
@@ -221,7 +211,7 @@ in rec {
services.default = target {
name = "default";
contents = with services; [
loopback
config.hardware.networkInterfaces.lo
config.hardware.networkInterfaces.lan
int
bridge