forked from mirrors_public/oddlama_nix-config
feat: reenable zackbiene and add it to topology
This commit is contained in:
parent
5604cdd4cc
commit
f171d1e83a
11 changed files with 43 additions and 15 deletions
6
flake.lock
generated
6
flake.lock
generated
|
@ -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": {
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -80,6 +80,7 @@ in {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
topology.self.services.influxdb2.info = "https://${influxdbDomain}";
|
||||||
services.influxdb2 = {
|
services.influxdb2 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
@ -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"];
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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 = [
|
||||||
|
|
|
@ -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";};
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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" {
|
||||||
|
|
BIN
topology/images/odroid-n2plus.png
Normal file
BIN
topology/images/odroid-n2plus.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 92 KiB |
Loading…
Add table
Add a link
Reference in a new issue