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