1{ config, lib, pkgs, ... }:
2
3with lib;
4
5{
6
7 ###### interface
8
9 options = {
10
11 networking.wicd.enable = mkOption {
12 type = types.bool;
13 default = false;
14 description = ''
15 Whether to start <command>wicd</command>. Wired and
16 wireless network configurations can then be managed by
17 wicd-client.
18 '';
19 };
20 };
21
22
23 ###### implementation
24
25 config = mkIf config.networking.wicd.enable {
26
27 environment.systemPackages = [pkgs.wicd];
28
29 systemd.services.wicd = {
30 after = [ "network-pre.target" ];
31 before = [ "network.target" ];
32 wants = [ "network.target" ];
33 wantedBy = [ "multi-user.target" ];
34 script = "${pkgs.wicd}/sbin/wicd -f";
35 };
36
37 services.dbus.enable = true;
38 services.dbus.packages = [pkgs.wicd];
39 };
40}