diff options
Diffstat (limited to 'makefu/2configs')
-rw-r--r-- | makefu/2configs/hw/bluetooth.nix | 2 | ||||
-rwxr-xr-x | makefu/2configs/hw/lte.sh | 26 | ||||
-rw-r--r-- | makefu/2configs/hw/network-manager.nix | 9 | ||||
-rw-r--r-- | makefu/2configs/hw/xmm7360.nix | 4 |
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 ]; } |