ctucx.git: nixfiles

ctucx' nixfiles

commit cd9ac762c1999dc8f8283e0cf29efc02964249b2
parent ad8b3ce078216b62f24436eb9059a55cba3c72f8
Author: Katja (ctucx) <git@ctu.cx>
Date: Sun, 9 Mar 2025 17:46:18 +0100

configurations/nixos/configure/mosquitto: disable auth on websockets
3 files changed, 26 insertions(+), 51 deletions(-)
M
configurations/nixos/configure/smarthome/mosquitto.nix
|
63
++++++++++++++++++++++++++-------------------------------------
D
secrets/briefkasten/mosquitto/passwd-katja.age
|
12
------------
M
secrets/secrets.nix
|
2
--
diff --git a/configurations/nixos/configure/smarthome/mosquitto.nix b/configurations/nixos/configure/smarthome/mosquitto.nix
@@ -2,46 +2,35 @@
 
 {
 
-  age.secrets = {
-    mosquitto-passwd-katja = {
-      file  = ./. + "/../../../../secrets/${config.networking.hostName}/mosquitto/passwd-katja.age";
-      owner = "mosquitto";
-    };
-  };
-
-  services = {
-    mosquitto = {
-      enable      = true;
-      persistence = false;
-      settings = {
-        max_keepalive = 60;
-      };
-      listeners = [
+  services.mosquitto = {
+    enable      = true;
+    persistence = false;
+    settings.max_keepalive = 60;
+    listeners = [
 
-        {
-          port = 1883;
-          omitPasswordAuth = true;
-          users = {};
-          settings = {
-            allow_anonymous = true;
-          };
-          acl = [ "topic readwrite #" "pattern readwrite #" ];
-        }
+      {
+        port = 1883;
+        omitPasswordAuth = true;
+        users = {};
+        settings = {
+          allow_anonymous = true;
+        };
+        acl = [ "topic readwrite #" "pattern readwrite #" ];
+      }
 
-        {
-          address = "::1";
-          port    = 9005;
-          users = {
-            katja.passwordFile = config.age.secrets.mosquitto-passwd-katja.path;
-          };
-          settings = {
-            protocol = "websockets";
-          };
-          acl = [ "topic readwrite #" "pattern readwrite #" ];
-        }
+      {
+        address = "::1";
+        port    = 9005;
+        omitPasswordAuth = true;
+        users = {};
+        settings = {
+          protocol        = "websockets";
+          allow_anonymous = true;
+        };
+        acl = [ "topic readwrite #" "pattern readwrite #" ];
+      }
 
-      ];
-    };
+    ];
   };
 
 }
diff --git a/secrets/briefkasten/mosquitto/passwd-katja.age b/secrets/briefkasten/mosquitto/passwd-katja.age
@@ -1,12 +0,0 @@
------BEGIN AGE ENCRYPTED FILE-----
-YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBsUE9KeEVyVk8ybEdYckxS
-WU5aLzRQL3JvcDR6TzZJR1l5TWlkNGxLL0VNCjJ5c1ltUlNoangxam9FV0wwRlpZ
-NVk3cExaTHNtWTI2K2dzRWxCWm9CNGsKLT4gc3NoLWVkMjU1MTkgNGhLQ013IGdl
-WDNtWmxra3JsUmcxbFc2ZjVvQldGVnFKbzAveU0rNnhVazNvWGdwajAKVVYvRTNZ
-UnBGZHdUekNBV0VxNDlranRhK2lxM2FLQjc2N1UwOVlIV0NOawotPiBEcGFyRFNf
-Ny1ncmVhc2UgekQgZW8iCmFsS0lJbUsvUGRUUnpQSDRnYlR5QzdWMUp0aXJ5STFT
-cmd2UmtxOXhUbDk4WklVckFBOFB2YWoxdDVvbmVxZ0YKalZrd0xaTnVkamtjWld4
-bUlZUEJJdlRoCi0tLSAybHJqa1hDb3p3TjBkb256cjBqZ1ptR1NublZXWFkzRTVu
-QUd3eVpyaXFJCtH69PckuhDsWTfUGZjeqzGs5fK9aQnkY6ECsSs4rqn5maHFrDEo
-0rXH
------END AGE ENCRYPTED FILE-----
diff --git a/secrets/secrets.nix b/secrets/secrets.nix
@@ -50,8 +50,6 @@ let
       "influx/master_token.age"
       "influx/backup_env.age"
 
-      "mosquitto/passwd-katja.age"
-
       "telegraf/secrets.env.age"
 
       "zigbee2mqtt/secrets.age"