mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-10-05 19:28:26 +02:00
@@ -13,7 +13,10 @@
|
|||||||
];
|
];
|
||||||
in {
|
in {
|
||||||
sops.secrets =
|
sops.secrets =
|
||||||
{signal_sender_number.owner = "hass";}
|
{
|
||||||
|
signal_sender_number.owner = "hass";
|
||||||
|
alarm_code.owner = "hass";
|
||||||
|
}
|
||||||
// lib.genAttrs signalRecipients (_: {owner = "hass";});
|
// lib.genAttrs signalRecipients (_: {owner = "hass";});
|
||||||
|
|
||||||
sops.templates."home-assistant-secrets.yaml" = {
|
sops.templates."home-assistant-secrets.yaml" = {
|
||||||
@@ -22,6 +25,7 @@ in {
|
|||||||
restartUnits = ["home-assistant.service"];
|
restartUnits = ["home-assistant.service"];
|
||||||
content =
|
content =
|
||||||
"signal_sender: \"${config.sops.placeholder.signal_sender_number}\"\n"
|
"signal_sender: \"${config.sops.placeholder.signal_sender_number}\"\n"
|
||||||
|
+ "alarm_code: \"${config.sops.placeholder.alarm_code}\"\n"
|
||||||
+ lib.concatMapStrings (n: "${n}: \"${config.sops.placeholder.${n}}\"\n") signalRecipients;
|
+ lib.concatMapStrings (n: "${n}: \"${config.sops.placeholder.${n}}\"\n") signalRecipients;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -55,6 +59,24 @@ in {
|
|||||||
automation = "!include automations.yaml";
|
automation = "!include automations.yaml";
|
||||||
script = "!include scripts.yaml";
|
script = "!include scripts.yaml";
|
||||||
frontend.themes = nixyTheme;
|
frontend.themes = nixyTheme;
|
||||||
|
alarm_control_panel = [
|
||||||
|
{
|
||||||
|
platform = "manual";
|
||||||
|
name = "Home";
|
||||||
|
code = "!secret alarm_code";
|
||||||
|
code_arm_required = false;
|
||||||
|
armed_home = {
|
||||||
|
arming_time = 0;
|
||||||
|
delay_time = 0;
|
||||||
|
trigger_time = 120;
|
||||||
|
};
|
||||||
|
armed_away = {
|
||||||
|
arming_time = 30;
|
||||||
|
delay_time = 30;
|
||||||
|
trigger_time = 120;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
notify =
|
notify =
|
||||||
(map (n: {
|
(map (n: {
|
||||||
name = "signal_${n}";
|
name = "signal_${n}";
|
||||||
|
|||||||
Reference in New Issue
Block a user