summaryrefslogtreecommitdiffstats
path: root/makefu
diff options
context:
space:
mode:
Diffstat (limited to 'makefu')
-rw-r--r--makefu/1systems/x/config.nix3
-rw-r--r--makefu/2configs/hw/network-manager.nix37
-rw-r--r--makefu/2configs/hw/wwan.nix8
-rw-r--r--makefu/3modules/wvdial.nix71
4 files changed, 39 insertions, 80 deletions
diff --git a/makefu/1systems/x/config.nix b/makefu/1systems/x/config.nix
index a32db91e1..f3a1d488c 100644
--- a/makefu/1systems/x/config.nix
+++ b/makefu/1systems/x/config.nix
@@ -59,8 +59,9 @@ with import <stockholm/lib>;
# Hardware
<stockholm/makefu/2configs/hw/tp-x230.nix>
+ # <stockholm/makefu/2configs/hw/tpm.nix>
<stockholm/makefu/2configs/hw/rtl8812au.nix>
- <stockholm/makefu/2configs/hw/wwan.nix>
+ <stockholm/makefu/2configs/hw/network-manager.nix>
<stockholm/makefu/2configs/hw/stk1160.nix>
# <stockholm/makefu/2configs/rad1o.nix>
diff --git a/makefu/2configs/hw/network-manager.nix b/makefu/2configs/hw/network-manager.nix
new file mode 100644
index 000000000..7e29849b1
--- /dev/null
+++ b/makefu/2configs/hw/network-manager.nix
@@ -0,0 +1,37 @@
+{ pkgs, lib, ... }:
+{
+ users.users.makefu = {
+ extraGroups = [ "networkmanager" ];
+ packages = with pkgs;[
+ networkmanagerapplet
+ gnome3.gnome_keyring gnome3.dconf
+ ];
+ };
+ networking.wireless.enable = lib.mkForce false;
+
+ systemd.services.modemmanager = {
+ description = "ModemManager";
+ after = [ "network-manager.service" ];
+ bindsTo = [ "network-manager.service" ];
+ wantedBy = [ "network-manager.service" ];
+ serviceConfig = {
+ ExecStart = "${pkgs.modemmanager}/bin/ModemManager";
+ PrivateTmp = true;
+ Restart = "always";
+ RestartSec = "5";
+ };
+ };
+ networking.networkmanager.enable = true;
+
+ # TODO: put somewhere else
+ services.xserver.displayManager.sessionCommands = ''
+ ${pkgs.clipit}/bin/clipit &
+ ${pkgs.networkmanagerapplet}/bin/nm-applet &
+ '';
+
+# nixOSUnstable
+# networking.networkmanager.wifi = {
+# powersave = true;
+# scanRandMacAddress = true;
+# };
+}
diff --git a/makefu/2configs/hw/wwan.nix b/makefu/2configs/hw/wwan.nix
deleted file mode 100644
index 0eb0c97d7..000000000
--- a/makefu/2configs/hw/wwan.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-_:
-
-{
- makefu.umts = {
- enable = true;
- modem-device = "/dev/serial/by-id/usb-Lenovo_H5321_gw_2D5A51BA0D3C3A90-if01";
- };
-}
diff --git a/makefu/3modules/wvdial.nix b/makefu/3modules/wvdial.nix
deleted file mode 100644
index 1ed929ed4..000000000
--- a/makefu/3modules/wvdial.nix
+++ /dev/null
@@ -1,71 +0,0 @@
-# Global configuration for wvdial.
-
-{ config, lib, pkgs, ... }:
-
-with lib;
-
-let
-
- configFile = ''
- [Dialer Defaults]
- PPPD PATH = ${pkgs.ppp}/sbin/pppd
- ${config.environment.wvdial.dialerDefaults}
- '';
-
- cfg = config.environment.wvdial;
-
-in
-{
- ###### interface
-
- options = {
-
- environment.wvdial = {
-
- dialerDefaults = mkOption {
- default = "";
- type = types.str;
- example = ''Init1 = AT+CGDCONT=1,"IP","internet.t-mobile"'';
- description = ''
- Contents of the "Dialer Defaults" section of
- <filename>/etc/wvdial.conf</filename>.
- '';
- };
-
- pppDefaults = mkOption {
- default = ''
- noipdefault
- usepeerdns
- defaultroute
- persist
- noauth
- '';
- type = types.str;
- description = "Default ppp settings for wvdial.";
- };
-
- };
-
- };
-
- ###### implementation
-
- config = mkIf (cfg.dialerDefaults != "") {
-
- environment = {
-
- etc =
- [
- { source = pkgs.writeText "wvdial.conf" configFile;
- target = "wvdial.conf";
- }
- { source = pkgs.writeText "wvdial" cfg.pppDefaults;
- target = "ppp/peers/wvdial";
- }
- ];
-
- };
-
- };
-
-}