pepe update 20.09
This commit is contained in:
parent
543b582f60
commit
94d29220d8
14 changed files with 86 additions and 24 deletions
|
@ -57,11 +57,12 @@
|
|||
|
||||
# lvm volume group
|
||||
# ----------------
|
||||
boot.initrd.luks.devices = [{
|
||||
name = "secure_vg";
|
||||
boot.initrd.luks.devices = {
|
||||
"secure_vg" = {
|
||||
device = "/dev/sda2";
|
||||
preLVM = true;
|
||||
}];
|
||||
};
|
||||
};
|
||||
|
||||
# NTFS support
|
||||
# ------------
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
imports = [
|
||||
./mqtt.nix
|
||||
./zigbee2mqtt/buttons.nix
|
||||
./zigbee2mqtt/configurationHelper.nix
|
||||
./zigbee2mqtt/doors.nix
|
||||
./zigbee2mqtt/fyrtur.nix
|
||||
./zigbee2mqtt/heater.nix
|
||||
|
@ -9,16 +10,55 @@
|
|||
./zigbee2mqtt/lights.nix
|
||||
./zigbee2mqtt/motion.nix
|
||||
./zigbee2mqtt/repeater.nix
|
||||
./zigbee2mqtt/service.nix
|
||||
./zigbee2mqtt/temperatur.nix
|
||||
];
|
||||
|
||||
#services.zigbee2mqtt = {
|
||||
# enable = true;
|
||||
# mqttPassword = lib.fileContents <secrets/zigbee/password>;
|
||||
# networkKey = import <secrets/home-assistant/zigbee/networkKey>;
|
||||
# # only turn on for new devices, usually turn of for security reasons.
|
||||
# discover = true;
|
||||
#};
|
||||
|
||||
# new
|
||||
services.zigbee2mqtt = {
|
||||
enable = true;
|
||||
mqttPassword = lib.fileContents <secrets/zigbee/password>;
|
||||
networkKey = import <secrets/home-assistant/zigbee/networkKey>;
|
||||
# only turn on for new devices, usually turn of for security reasons.
|
||||
discover = true;
|
||||
config = {
|
||||
|
||||
# Home Assistant integration (MQTT discovery)
|
||||
homeassistant = false;
|
||||
|
||||
# allow new devices to join
|
||||
permit_join = true;
|
||||
|
||||
# MQTT settings
|
||||
mqtt = {
|
||||
# MQTT base topic for zigbee2mqtt MQTT messages
|
||||
base_topic = "zigbee2mqtt";
|
||||
# MQTT server URL
|
||||
server = "mqtt://127.0.0.1:1883";
|
||||
# MQTT server authentication, uncomment if required:
|
||||
user = "zigbee";
|
||||
password = lib.fileContents <secrets/zigbee/password>;
|
||||
};
|
||||
|
||||
# Serial settings
|
||||
serial = {
|
||||
port = "/dev/ttyACM0";
|
||||
# disable LED of CC2531 USB sniffer
|
||||
disable_led = true;
|
||||
};
|
||||
|
||||
# you own network key,
|
||||
# 16 numbers between 0 and 255
|
||||
# see https://www.zigbee2mqtt.io/how_tos/how_to_secure_network.html
|
||||
advanced.network_key = import <secrets/home-assistant/zigbee/networkKey>;
|
||||
|
||||
# todo : devices should be defined later
|
||||
#devices = cfg.devices;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -9,21 +9,21 @@ let
|
|||
|
||||
# https://www.zigbee2mqtt.io/devices/WXKG12LM.html
|
||||
allDevices = {
|
||||
"button_1" = {
|
||||
"button_a1" = {
|
||||
id = "0x00158d0002b04f65";
|
||||
#groups = [ "living_room" ];
|
||||
states.single = "input_boolean.situation_toggle";
|
||||
states.hold = "input_boolean.printer_toggle";
|
||||
states.double = "input_boolean.windows_up";
|
||||
};
|
||||
"button_2" = {
|
||||
"button_a2" = {
|
||||
id = "0x00158d0002b04f09";
|
||||
#groups = [ "bed_room" ];
|
||||
states.single = "input_boolean.situation_toggle";
|
||||
states.hold = "input_boolean.printer_toggle";
|
||||
states.double = "input_boolean.windows_up";
|
||||
};
|
||||
"button_3" = {
|
||||
"button_a3" = {
|
||||
id = "0x00158d0002b00e04";
|
||||
#groups = [ "bed_room" ];
|
||||
states.single = "input_boolean.situation_toggle";
|
||||
|
@ -34,7 +34,7 @@ let
|
|||
|
||||
in {
|
||||
|
||||
services.zigbee2mqtt.devices = lib.mapAttrs' (name:
|
||||
services.zigbee2mqttConfiguration = lib.mapAttrs' (name:
|
||||
{ id, ... }: {
|
||||
name = id;
|
||||
value = {
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.services.zigbee2mqttConfiguration;
|
||||
|
||||
in {
|
||||
|
||||
options.services.zigbee2mqttConfiguration = mkOption {
|
||||
type = with types; attrs;
|
||||
description = ''
|
||||
device definitions.
|
||||
'';
|
||||
};
|
||||
config = {
|
||||
services.zigbee2mqtt.config.devices = cfg;
|
||||
};
|
||||
}
|
|
@ -12,7 +12,7 @@ let
|
|||
|
||||
in {
|
||||
|
||||
services.zigbee2mqtt.devices = lib.mapAttrs' (name:
|
||||
services.zigbee2mqttConfiguration = lib.mapAttrs' (name:
|
||||
{ id, ... }: {
|
||||
name = id;
|
||||
value = {
|
||||
|
|
|
@ -13,7 +13,7 @@ let
|
|||
# -t "zigbee2mqtt/fyrtur1/set" -m '{"position":15}'
|
||||
in {
|
||||
|
||||
services.zigbee2mqtt.devices = lib.mapAttrs' (name:
|
||||
services.zigbee2mqttConfiguration = lib.mapAttrs' (name:
|
||||
{ id, ... }: {
|
||||
name = id;
|
||||
value = {
|
||||
|
|
|
@ -14,7 +14,7 @@ let
|
|||
|
||||
in {
|
||||
|
||||
services.zigbee2mqtt.devices = lib.mapAttrs' (name:
|
||||
services.zigbee2mqttConfiguration = lib.mapAttrs' (name:
|
||||
{ id, ... }: {
|
||||
name = id;
|
||||
value = {
|
||||
|
|
|
@ -13,7 +13,7 @@ let
|
|||
# -t "zigbee2mqtt/led_1/set" -m '{"state":"OFF"}'
|
||||
in {
|
||||
|
||||
services.zigbee2mqtt.devices = lib.mapAttrs' (name:
|
||||
services.zigbee2mqttConfiguration = lib.mapAttrs' (name:
|
||||
{ id, ... }: {
|
||||
name = id;
|
||||
value = {
|
||||
|
|
|
@ -15,7 +15,7 @@ let
|
|||
|
||||
in {
|
||||
|
||||
services.zigbee2mqtt.devices = lib.mapAttrs' (name:
|
||||
services.zigbee2mqttConfiguration = lib.mapAttrs' (name:
|
||||
{ id, ... }: {
|
||||
name = id;
|
||||
value = {
|
||||
|
|
|
@ -16,7 +16,7 @@ let
|
|||
|
||||
in {
|
||||
|
||||
services.zigbee2mqtt.devices = lib.mapAttrs' (name:
|
||||
services.zigbee2mqttConfiguration = lib.mapAttrs' (name:
|
||||
{ id, timeout ? 65, ... }: {
|
||||
name = id;
|
||||
value = {
|
||||
|
|
|
@ -10,7 +10,7 @@ let
|
|||
};
|
||||
|
||||
in {
|
||||
services.zigbee2mqtt.devices = lib.mapAttrs' (name:
|
||||
services.zigbee2mqttConfiguration = lib.mapAttrs' (name:
|
||||
{ id, ... }: {
|
||||
name = id;
|
||||
value = { friendly_name = name; };
|
||||
|
|
|
@ -15,7 +15,7 @@ let
|
|||
|
||||
in {
|
||||
|
||||
services.zigbee2mqtt.devices = lib.mapAttrs' (name:
|
||||
services.zigbee2mqttConfiguration = lib.mapAttrs' (name:
|
||||
{ id, ... }: {
|
||||
name = id;
|
||||
value = {
|
||||
|
|
|
@ -13,7 +13,7 @@ in {
|
|||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
bitwig-studio
|
||||
#bitwig-studio
|
||||
sononym-crawler
|
||||
|
||||
# rust development environment
|
||||
|
|
|
@ -9,7 +9,8 @@ rustPlatform.buildRustPackage rec {
|
|||
sha256 = "1bnxvgaa58hga20ywgk728aj4wll2rhxgrdp477d2d8isifvij4v";
|
||||
};
|
||||
|
||||
cargoSha256 = "05mm82hdbs36p6mr4qdpip16phg28r44lbni09x48qni81dbw3wx";
|
||||
cargoSha256 = "1hhgk3mpmd143d3kfhxsaz2y5aksnwiz1bh4396hh0j7j4kqbgrw";
|
||||
#cargoSha256 = "05mm82hdbs36p6mr4qdpip16phg28r44lbni09x48qni81dbw3wx";
|
||||
#verifyCargoDeps = true;
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
|
Loading…
Reference in a new issue