From eaa4ef076f0ab2d2aa47a0f982ebbef758ed18ba Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Thu, 16 Feb 2023 02:51:03 -0600 Subject: [PATCH] Update nixunstable Update dnsmasq to new format to avoid deprecation issues Add smart home energy modules to Home Assistant --- flake.lock | 6 ++-- hosts/2maccabees/dnsmasq.nix | 51 ++++++++++++++++------------- hosts/2maccabees/home-assistant.nix | 2 ++ 3 files changed, 33 insertions(+), 26 deletions(-) diff --git a/flake.lock b/flake.lock index d90d484..6daa6a9 100644 --- a/flake.lock +++ b/flake.lock @@ -143,11 +143,11 @@ }, "nixunstable": { "locked": { - "lastModified": 1673540789, - "narHash": "sha256-xqnxBOK3qctIeUVxecydrEDbEXjsvHCPGPbvsl63M/U=", + "lastModified": 1676300157, + "narHash": "sha256-1HjRzfp6LOLfcj/HJHdVKWAkX9QRAouoh6AjzJiIerU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "0f213d0fee84280d8c3a97f7469b988d6fe5fcdf", + "rev": "545c7a31e5dedea4a6d372712a18e00ce097d462", "type": "github" }, "original": { diff --git a/hosts/2maccabees/dnsmasq.nix b/hosts/2maccabees/dnsmasq.nix index 8d02617..578cab0 100644 --- a/hosts/2maccabees/dnsmasq.nix +++ b/hosts/2maccabees/dnsmasq.nix @@ -21,25 +21,6 @@ let ]; extraConfig = builtins.concatStringsSep "\n" [ - "expand-hosts" - "domain=thehellings.lan" - "log-dhcp" - "log-queries" - "addn-hosts=/etc/adblock_hosts" - -# "dhcp-range=eth0,10.42.0.1,10.42.1.255,255.255.0.0,static" - "dhcp-range=eth0,10.42.2.1,10.42.2.255,255.255.0.0,12h" - "dhcp-option=eth0,option:router,10.42.1.1" - "dhcp-option=eth0,option:dns-server,10.42.1.2,1.1.1.1" - "dhcp-option=eth0,option:domain-search,thehellings.lan" - - "dhcp-range=vlan66@eth0,192.168.66.3,192.168.66.150,255.255.255.0,12h" - "dhcp-option=vlan66@eth0,option:router,192.168.66.1" - "dhcp-option=vlan66@eth0,option:dns-server,192.168.66.2" - - "dhcp-range=vlan67@eth0,192.168.67.3,192.168.67.150,12h" - "dhcp-option=vlan67@eth0,option:router,192.168.67.1" - "dhcp-option=vlan67@eth0,option:dns-server,192.168.67.2" ]; in { @@ -47,10 +28,34 @@ in services.dnsmasq = { enable = true; # Public AdGuard DNS servers - servers = [ - "94.140.14.14" - "94.140.15.15" - ]; + settings = { + domain = "thehellings.lan"; + dhcp-range = [ + # "eth0,10.42.0.1,10.42.1.255,255.255.0.0,static" + "eth0,10.42.2.1,10.42.2.255,255.255.0.0,12h" + "vlan66@eth0,192.168.66.3,192.168.66.150,255.255.255.0,12h" + "vlan67@eth0,192.168.67.3,192.168.67.150,12h" + ]; + dhcp-option = [ + "eth0,option:router,10.42.1.1" + "eth0,option:dns-server,10.42.1.2,1.1.1.1" + "eth0,option:domain-search,thehellings.lan" + + "vlan66@eth0,option:router,192.168.66.1" + "vlan66@eth0,option:dns-server,192.168.66.2" + + "vlan67@eth0,option:router,192.168.67.1" + "vlan67@eth0,option:dns-server,192.168.67.2" + ]; + expand-hosts = true; + log-dhcp = true; + log-queries = true; + addn-hosts = "/etc/adblock_hosts"; + server = [ + "94.140.14.14" + "94.140.15.15" + ]; + }; extraConfig = "${extraConfig}"; }; environment.systemPackages = [ pkgs.curl ]; diff --git a/hosts/2maccabees/home-assistant.nix b/hosts/2maccabees/home-assistant.nix index 7c1f2c2..50d4af0 100755 --- a/hosts/2maccabees/home-assistant.nix +++ b/hosts/2maccabees/home-assistant.nix @@ -17,6 +17,8 @@ in "eufy" "lovelace" "nextcloud" + "smart_meter_texas" + "solaredge" "tplink" "wiz" "zwave_js"