dhcp file leases with lan name
This commit is contained in:
parent
4343865e6f
commit
35710f6d3c
2 changed files with 10 additions and 3 deletions
|
|
@ -65,7 +65,7 @@ let
|
|||
localise-queries
|
||||
no-hosts
|
||||
expand-hosts
|
||||
dhcp-leasefile=/tmp/dhcp.leases
|
||||
dhcp-leasefile=/tmp/${lanCfg.name}.vmix.dhcp.leases
|
||||
'' +
|
||||
lib.concatStringsSep "\n" (lib.optionals (lanCfg.ipv4.dns.upstream != []) ([ "no-resolv" ] ++ (builtins.map (dnsServer: "server=${dnsServer}") lanCfg.ipv4.dns.upstream)))
|
||||
);
|
||||
|
|
@ -161,7 +161,14 @@ let
|
|||
networkNames = builtins.attrNames vmixCfg.networks;
|
||||
|
||||
networkServices = pkgs.unstable.lib.mergeAttrsList (lib.imap0 (index: networkName: (mkNetworkServices networkName (vmixCfg.networks.${networkName} // { inherit index;}))) networkNames);
|
||||
networkTargets = lib.concatMapAttrs (networkName: netCfg: {
|
||||
"net.vmix@${networkName}" = {
|
||||
description = "Network ${networkName} for vmix";
|
||||
bindsTo = [ "ns.net.vmix@${networkName}.service" ];
|
||||
};
|
||||
}) vmixCfg.networks;
|
||||
in
|
||||
{
|
||||
config.systemd.services = namespaceGlobalService // networkServices;
|
||||
config.systemd.targets = networkTargets;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue