summaryrefslogtreecommitdiffstats
path: root/makefu
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2021-10-01 18:52:09 +0200
committermakefu <github@syntax-fehler.de>2021-10-01 18:52:09 +0200
commit9ae9c6c88848545648d0de8b5a0e337ae86cf965 (patch)
treebb88337187bedcf281f0b935c5563cd1206a3f60 /makefu
parent0e849e1eed8985bd5e0f9635c9973da4b5dc7dbb (diff)
ma hw: cleanup
Diffstat (limited to 'makefu')
-rw-r--r--makefu/2configs/hw/bluetooth.nix2
-rwxr-xr-xmakefu/2configs/hw/lte.sh26
-rw-r--r--makefu/2configs/hw/network-manager.nix9
-rw-r--r--makefu/2configs/hw/xmm7360.nix4
4 files changed, 38 insertions, 3 deletions
diff --git a/makefu/2configs/hw/bluetooth.nix b/makefu/2configs/hw/bluetooth.nix
index 411121556..1b1675f14 100644
--- a/makefu/2configs/hw/bluetooth.nix
+++ b/makefu/2configs/hw/bluetooth.nix
@@ -33,7 +33,7 @@
hardware.bluetooth = {
enable = true;
powerOnBoot = false;
- config.general.Enable = "Source,Sink,Media,Socket";
+ settings.general.Enable = "Source,Sink,Media,Socket";
};
services.dbus.packages = [ pkgs.blueman ];
}
diff --git a/makefu/2configs/hw/lte.sh b/makefu/2configs/hw/lte.sh
new file mode 100755
index 000000000..a8ae31586
--- /dev/null
+++ b/makefu/2configs/hw/lte.sh
@@ -0,0 +1,26 @@
+#/bin/sh
+
+if [[ "$EUID" -ne 0 ]]; then
+ echo "This script must be run as root, elevating!"
+ exec sudo $0 $1
+ exit 0
+fi
+
+if [[ "$1" = "down" ]]; then
+ echo "taking wwan0 down!"
+ ip link set wwan0 down
+ rmmod xmm7360
+ exit
+fi
+
+if [[ "$1" = "up" ]]; then
+ echo "running modprobe"
+ modprobe xmm7360
+ echo "bringing wwan0 up!"
+ until open_xdatachannel -a web.vodafone.de;do
+ modprobe -r xmm7360
+ modprobe xmm7360
+ done
+ ip link set wwan0 up
+ echo "nameserver 1.1.1.1" | tee -a /etc/resolv.conf
+fi
diff --git a/makefu/2configs/hw/network-manager.nix b/makefu/2configs/hw/network-manager.nix
index f44d4afd4..050787df8 100644
--- a/makefu/2configs/hw/network-manager.nix
+++ b/makefu/2configs/hw/network-manager.nix
@@ -28,7 +28,7 @@
scanRandMacAddress = true;
backend = "iwd";
};
- services.gnome3.gnome-keyring.enable = true;
+ services.gnome.gnome-keyring.enable = true;
networking.wireless.iwd.enable = true;
state = [
@@ -37,4 +37,11 @@
networking.networkmanager.dispatcherScripts = [
{ source = "${pkgs.prison-break}/bin/prison-break"; }
];
+
+ # TODO: not sure if this actually works
+ systemd.services.NetworkManager-dispatcher.environment = {
+ DISPLAY= ":0";
+ DBUS_SESSION_BUS_ADDRESS = "unix:path=/run/user/9001/bus";
+ };
+
}
diff --git a/makefu/2configs/hw/xmm7360.nix b/makefu/2configs/hw/xmm7360.nix
index 951dcaa0b..8facab8b5 100644
--- a/makefu/2configs/hw/xmm7360.nix
+++ b/makefu/2configs/hw/xmm7360.nix
@@ -1,5 +1,7 @@
{ pkgs, config, ... }:
let
+ helper = pkgs.writeScriptBin "lte" (builtins.readFile ./lte.sh);
+
pkg = (pkgs.callPackage ../../5pkgs/xmm7360 { kernel = config.boot.kernelPackages.kernel; });
in
{
@@ -7,5 +9,5 @@ in
pkg
];
boot.initrd.availableKernelModules = [ "xmm7360" ];
- users.users.makefu.packages = [ pkg ];
+ users.users.makefu.packages = [ pkg helper ];
}