aubergine: hack dbus
authorJulien Moutinho <julm+julm-nix@sourcephile.fr>
Fri, 7 Oct 2022 11:14:42 +0000 (13:14 +0200)
committerJulien Moutinho <julm+julm-nix@sourcephile.fr>
Mon, 10 Oct 2022 11:48:02 +0000 (13:48 +0200)
hosts/aubergine/networking.nix

index 69c7cf1f08662b22c77bcb8066b043e1da4d7e02..39e0c7041f7705b158abe572363a95985a5e5189 100644 (file)
@@ -203,6 +203,31 @@ environment.systemPackages = [
   pkgs.dfeet
 ];
 
+security.polkit.extraConfig = ''
+  /* Allow calling for local dialout group members */
+  polkit.addRule(function(action, subject) {
+      if (action.id == "org.freedesktop.ModemManager1.Voice" &&
+          subject.local && subject.active && subject.isInGroup("dialout"))
+      {
+          return polkit.Result.YES;
+      }
+  });
+'';
+#services.dbus.apparmor = "enabled";
+systemd.sockets.dbus.listenStreams = ["0.0.0.0:4444"];
+services.dbus.packages = [
+  pkgs.dconf
+  (pkgs.writeTextDir "share/dbus-1/system.d/hack-system.conf" ''
+       <listen>tcp:host=192.168.5.1,bind=0.0.0.0,port=4444,family=ipv4</listen>
+       <listen>unix:tmpdir=/tmp</listen>
+
+       <auth>ANONYMOUS</auth>
+       <allow_anonymous/>
+  '')
+];
+programs.dconf.enable = true;
+
+
 # iw dev wlp5s0 station dump
 # DOC: https://w1.fi/cgit/hostap/plain/hostapd/hostapd.conf
 services.hostapd = {