summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/hw/network-manager.nix
blob: e781c7ed1028eb78a8aa672a5060661b479c78d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ pkgs, lib, ... }:
let
  prison-break = pkgs.callPackage ../../../krebs/5pkgs/simple/prison-break {};
in
{
  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";
    bindsTo = [ "network-manager.service" ];
    wantedBy = [ "network-manager.service" "multi-user.target" ];
    serviceConfig = {
      ExecStart = "${pkgs.modemmanager}/bin/ModemManager";
      PrivateTmp = true;
      Restart = "always";
      RestartSec = "5";
    };
  };
  networking.networkmanager.enable = true;

# nixOSUnstable
  networking.networkmanager.wifi = {
    powersave = true;
    scanRandMacAddress = true;
  };
  state = [
    "/etc/NetworkManager/system-connections"  #NM stateful config files
  ];
  networking.networkmanager.dispatcherScripts = [
    { source = "${prison-break}/bin/prison-break"; }
  ];
}