2014-04-14 07:26:48 -07:00
|
|
|
{ config, lib, pkgs, ... }:
|
2010-01-07 09:53:03 -08:00
|
|
|
|
2014-04-14 07:26:48 -07:00
|
|
|
with lib;
|
2010-01-07 09:53:03 -08:00
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
###### interface
|
|
|
|
|
|
|
|
options = {
|
2011-09-14 11:20:50 -07:00
|
|
|
|
2010-01-07 09:53:03 -08:00
|
|
|
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
|
2011-09-14 11:20:50 -07:00
|
|
|
|
2010-01-07 09:53:03 -08:00
|
|
|
config = mkIf config.networking.wicd.enable {
|
|
|
|
|
|
|
|
environment.systemPackages = [pkgs.wicd];
|
|
|
|
|
2016-01-05 22:50:18 -08:00
|
|
|
systemd.services.wicd = {
|
2016-09-12 07:29:15 -07:00
|
|
|
after = [ "network-pre.target" ];
|
|
|
|
before = [ "network.target" ];
|
|
|
|
wants = [ "network.target" ];
|
2016-01-05 22:50:18 -08:00
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
script = "${pkgs.wicd}/sbin/wicd -f";
|
|
|
|
};
|
2010-01-07 09:53:03 -08:00
|
|
|
|
|
|
|
services.dbus.enable = true;
|
|
|
|
services.dbus.packages = [pkgs.wicd];
|
|
|
|
};
|
|
|
|
}
|