This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

machines.barnacle: add self.retiolum hosts to /etc/hosts

barnacle's hosts block only had kartei.extraHosts, so starkstrom.r and
acheron.r did not resolve there. self.retiolum now exposes extraHosts
(v4v6/v6only) rendered like kartei's, and barnacle appends it.

+25 -1
+20
retiolum/default.nix
··· 57 57 ++ [ "Ed25519PublicKey = ${tinc.pubkey_ed25519}" ] 58 58 ++ lib.optional (tinc.weight or 300 != null) "Weight = ${toString (tinc.weight or 300)}" 59 59 ); 60 + 61 + # /etc/hosts lines, rendered like kartei's netHostsLines for retiolum. 62 + hostsLines = 63 + hosts: withV4: 64 + lib.concatStrings ( 65 + lib.mapAttrsToList ( 66 + name: host: 67 + let 68 + net = retiolumOf host; 69 + aliases = lib.concatStringsSep " " (lib.unique ([ "${name}.r" ] ++ net.aliases or [ ])); 70 + in 71 + lib.optionalString (withV4 && net.ip4 or null != null) "${net.ip4.addr} ${aliases}\n" 72 + + lib.optionalString (net.ip6 or null != null) "${net.ip6.addr} ${aliases}\n" 73 + ) hosts 74 + ); 60 75 in 61 76 rec { 62 77 hosts = { ··· 94 109 ip4 = (retiolumOf host).ip4.addr or null; 95 110 ip6 = (retiolumOf host).ip6.addr or null; 96 111 }) hosts; 112 + 113 + extraHosts = { 114 + v4v6 = hostsLines hosts true; 115 + v6only = hostsLines hosts false; 116 + }; 97 117 }
+5 -1
machines/barnacle/retiolum.nix
··· 54 54 # darwin-rebuild via BEGIN/END markers. 55 55 system.activationScripts.postActivation.text = 56 56 let 57 - hostsFile = if own.ip4 == null then kartei.extraHosts.v6only else kartei.extraHosts.v4v6; 57 + hostsFile = 58 + if own.ip4 == null then 59 + kartei.extraHosts.v6only + local.extraHosts.v6only 60 + else 61 + kartei.extraHosts.v4v6 + local.extraHosts.v4v6; 58 62 in 59 63 lib.mkAfter '' 60 64 tmp=$(mktemp /private/etc/hosts.XXXXXX)