aboutsummaryrefslogtreecommitdiff
path: root/nixos/modules
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/develop.nix3
-rw-r--r--nixos/modules/home-assistant.nix4
-rw-r--r--nixos/modules/monitoring.nix2
-rw-r--r--nixos/modules/syncthing.nix4
4 files changed, 6 insertions, 7 deletions
diff --git a/nixos/modules/develop.nix b/nixos/modules/develop.nix
index 39a846e..e5b43b3 100644
--- a/nixos/modules/develop.nix
+++ b/nixos/modules/develop.nix
@@ -4,8 +4,7 @@
pkgs,
...
}:
-with lib; let
-in {
+with lib; {
options = {
cynerd.develop = mkOption {
type = types.bool;
diff --git a/nixos/modules/home-assistant.nix b/nixos/modules/home-assistant.nix
index bf98609..0aac9be 100644
--- a/nixos/modules/home-assistant.nix
+++ b/nixos/modules/home-assistant.nix
@@ -76,11 +76,11 @@ in {
consumer = data_type: topics: {
tags = {source = "bigclown";};
servers = ["tcp://localhost:1883"];
- topics = topics;
+ inherit topics;
username = "telegraf";
password = "$MQTT_PASSWORD";
data_format = "value";
- data_type = data_type;
+ inherit data_type;
topic_parsing = [
{
topic = "bigclown/node/+/+/+/+";
diff --git a/nixos/modules/monitoring.nix b/nixos/modules/monitoring.nix
index 86a37e4..44d3cb5 100644
--- a/nixos/modules/monitoring.nix
+++ b/nixos/modules/monitoring.nix
@@ -6,7 +6,7 @@
}:
with lib; let
cnf = config.cynerd.monitoring;
- hostName = config.networking.hostName;
+ inherit (config.networking) hostName;
isHost = cnf.host == hostName;
in {
options.cynerd.monitoring = {
diff --git a/nixos/modules/syncthing.nix b/nixos/modules/syncthing.nix
index 716e5a3..263acbe 100644
--- a/nixos/modules/syncthing.nix
+++ b/nixos/modules/syncthing.nix
@@ -7,7 +7,7 @@
with builtins;
with lib; let
cnf = config.cynerd.syncthing;
- hostName = config.networking.hostName;
+ inherit (config.networking) hostName;
allDevices = [
"albert"
"binky"
@@ -29,7 +29,7 @@ with lib; let
"ridcully"
"spt-omnia"
];
- filterDevice = folders: filterAttrs (n: v: any (d: d == hostName) v.devices) folders;
+ filterDevice = filterAttrs (n: v: any (d: d == hostName) v.devices);
in {
options = {
cynerd.syncthing = {