summary refs log tree commit diff
path: root/nixos/modules/services/networking/wicd.nix
blob: 18258084fc2c6309610b6e5cfc21343a0ac07459 (plain) (blame)
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
40
41
{ config, lib, pkgs, ... }:

with lib;

{

  ###### interface

  options = {

    networking.wicd.enable = mkOption {
      default = false;
      description = ''
        Whether to start <command>wicd</command>. Wired and
        wireless network configurations can then be managed by
        wicd-client.
      '';
    };
  };


  ###### implementation

  config = mkIf config.networking.wicd.enable {

    environment.systemPackages = [pkgs.wicd];

    jobs.wicd =
      { startOn = "started network-interfaces";
        stopOn = "stopping network-interfaces";

        script =
          "${pkgs.wicd}/sbin/wicd -f";
      };

    services.dbus.enable = true;
    services.dbus.packages = [pkgs.wicd];

  };

}