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-interfaces.target" ];
30 wantedBy = [ "multi-user.target" ];
31 script = "${pkgs.wicd}/sbin/wicd -f";
32 };
33
34 services.dbus.enable = true;
35 services.dbus.packages = [pkgs.wicd];
36 };
37}