1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-10 23:00:39 +02:00

feat: reenable zackbiene and add it to topology

This commit is contained in:
oddlama 2024-04-04 15:59:00 +02:00
parent 5604cdd4cc
commit f171d1e83a
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
11 changed files with 43 additions and 15 deletions

6
flake.lock generated
View file

@ -1012,11 +1012,11 @@
"pre-commit-hooks": "pre-commit-hooks_3" "pre-commit-hooks": "pre-commit-hooks_3"
}, },
"locked": { "locked": {
"lastModified": 1712231666, "lastModified": 1712238990,
"narHash": "sha256-SlgbQyccioWkep10dwtJ4WBZT3FpgwC0LnCBbm3rz7Y=", "narHash": "sha256-I+pn/hg6T0EQoJOZbgDy0VGxUAPvSONWQyLSDa1LS9Y=",
"owner": "oddlama", "owner": "oddlama",
"repo": "nix-topology", "repo": "nix-topology",
"rev": "a2e2a95a1b10ad93600351a6595c35ff1826ac8f", "rev": "da89590e6c94fba7bcd895d910ee363db37ed538",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -18,6 +18,6 @@ system = "x86_64-linux"
type = "nixos" type = "nixos"
system = "x86_64-linux" system = "x86_64-linux"
#[zackbiene] [zackbiene]
#type = "nixos" type = "nixos"
#system = "aarch64-linux" system = "aarch64-linux"

View file

@ -80,6 +80,7 @@ in {
} }
]; ];
topology.self.services.influxdb2.info = "https://${influxdbDomain}";
services.influxdb2 = { services.influxdb2 = {
enable = true; enable = true;
settings = { settings = {

View file

@ -22,7 +22,7 @@
]; ];
topology.self.hardware.image = ../../topology/images/odroid-h3.png; topology.self.hardware.image = ../../topology/images/odroid-h3.png;
topology.self.hardware.info = "ODROID H3, 64GB RAM"; topology.self.hardware.info = "O-Droid H3, 64GB RAM";
boot.mode = "efi"; boot.mode = "efi";
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" "r8169"]; boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" "r8169"];

View file

@ -14,16 +14,20 @@ in {
../../modules/optional/initrd-ssh.nix ../../modules/optional/initrd-ssh.nix
../../modules/optional/zfs.nix ../../modules/optional/zfs.nix
#./esphome.nix ./esphome.nix
./fs.nix ./fs.nix
./home-assistant.nix ./home-assistant.nix
./hostapd.nix ./hostapd.nix
#./mosquitto.nix ./mosquitto.nix
./kea.nix ./kea.nix
./net.nix ./net.nix
#./zigbee2mqtt.nix ./zigbee2mqtt.nix
]; ];
topology.self.name = "🥔zackbiene"; # yes this is 2x U+2009, don't ask (satori 🤬).
topology.self.hardware.image = ../../topology/images/odroid-n2plus.png;
topology.self.hardware.info = "O-Droid N2+";
boot.mode = "efi"; boot.mode = "efi";
users.groups.acme.members = ["nginx"]; users.groups.acme.members = ["nginx"];
services.nginx.enable = true; services.nginx.enable = true;

View file

@ -1,4 +1,11 @@
{config, ...}: { {
config,
nodes,
...
}: let
sentinelCfg = nodes.sentinel.config;
esphomeDomain = "esphome.${sentinelCfg.repo.secrets.global.domains.personal}";
in {
environment.persistence."/persist".directories = [ environment.persistence."/persist".directories = [
{ {
directory = "/var/lib/private/esphome"; directory = "/var/lib/private/esphome";
@ -6,6 +13,7 @@
} }
]; ];
topology.self.services.esphome.info = "https://${esphomeDomain}";
services.esphome = { services.esphome = {
enable = true; enable = true;
enableUnixSocket = true; enableUnixSocket = true;
@ -29,7 +37,7 @@
keepalive 2; keepalive 2;
''; '';
}; };
virtualHosts."${config.repo.secrets.local.esphome.domain}" = { virtualHosts."${esphomeDomain}" = {
forceSSL = true; forceSSL = true;
#enableACME = true; #enableACME = true;
sslCertificate = config.age.secrets."selfcert.crt".path; sslCertificate = config.age.secrets."selfcert.crt".path;

View file

@ -16,6 +16,7 @@ in {
} }
]; ];
topology.self.services.home-assistant.info = "https://${homeDomain}";
services.home-assistant = { services.home-assistant = {
enable = true; enable = true;
extraComponents = [ extraComponents = [

View file

@ -8,6 +8,10 @@
in { in {
networking.hostId = config.repo.secrets.local.networking.hostId; networking.hostId = config.repo.secrets.local.networking.hostId;
wireguard.proxy-sentinel = {
client.via = "sentinel";
};
boot.initrd.systemd.network = { boot.initrd.systemd.network = {
enable = true; enable = true;
networks = {inherit (config.systemd.network.networks) "10-lan1";}; networks = {inherit (config.systemd.network.networks) "10-lan1";};

View file

@ -1,4 +1,11 @@
{config, ...}: { {
config,
nodes,
...
}: let
sentinelCfg = nodes.sentinel.config;
zigbeeDomain = "zigbee.${sentinelCfg.repo.secrets.global.domains.personal}";
in {
age.secrets."mosquitto-pw-zigbee2mqtt.yaml" = { age.secrets."mosquitto-pw-zigbee2mqtt.yaml" = {
rekeyFile = ./secrets/mosquitto-pw-zigbee2mqtt.yaml.age; rekeyFile = ./secrets/mosquitto-pw-zigbee2mqtt.yaml.age;
mode = "440"; mode = "440";
@ -9,6 +16,7 @@
#security.acme.certs."home.${personalDomain}".extraDomainNames = [ #security.acme.certs."home.${personalDomain}".extraDomainNames = [
# "zigbee.home.${personalDomain}" # "zigbee.home.${personalDomain}"
#]; #];
topology.self.services.zigbee2mqtt.info = "https://${zigbeeDomain}";
services.zigbee2mqtt = { services.zigbee2mqtt = {
enable = true; enable = true;
settings = { settings = {
@ -37,7 +45,7 @@
keepalive 2; keepalive 2;
''; '';
}; };
virtualHosts."${config.repo.secrets.local.zigbee2mqtt.domain}" = { virtualHosts."${zigbeeDomain}" = {
forceSSL = true; forceSSL = true;
#enableACME = true; #enableACME = true;
sslCertificate = config.age.secrets."selfcert.crt".path; sslCertificate = config.age.secrets."selfcert.crt".path;

View file

@ -9,6 +9,7 @@
; ;
in { in {
networks.ward-kea.name = "Home LAN"; networks.ward-kea.name = "Home LAN";
networks.zackbiene-kea.name = "Isolated IoT Network";
networks.home-fritzbox = { networks.home-fritzbox = {
name = "Home Fritzbox"; name = "Home Fritzbox";
cidrv4 = "192.168.178.0/24"; cidrv4 = "192.168.178.0/24";
@ -38,9 +39,10 @@ in {
nodes.switch-attic = mkSwitch "Switch Attic" { nodes.switch-attic = mkSwitch "Switch Attic" {
info = "D-Link DGS-1016D"; info = "D-Link DGS-1016D";
image = ./images/dlink-dgs1016d.png; image = ./images/dlink-dgs1016d.png;
interfaceGroups = [["eth1" "eth2" "eth3" "eth4" "eth5" "eth6"]]; interfaceGroups = [["eth1" "eth2" "eth3" "eth4" "eth5" "eth6" "eth7"]];
connections.eth1 = mkConnection "ward" "lan-self"; connections.eth1 = mkConnection "ward" "lan-self";
connections.eth2 = mkConnection "sire" "lan-self"; connections.eth2 = mkConnection "sire" "lan-self";
connections.eth7 = mkConnection "zackbiene" "lan1";
}; };
nodes.switch-bedroom-1 = mkSwitch "Switch Bedroom 1" { nodes.switch-bedroom-1 = mkSwitch "Switch Bedroom 1" {

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB