2020-04-24 23:36:52 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
###### interface
|
|
|
|
|
|
|
|
options = {
|
|
|
|
|
|
|
|
networking.wicd.enable = mkOption {
|
2020-05-03 17:38:23 +00:00
|
|
|
type = types.bool;
|
2020-04-24 23:36:52 +00:00
|
|
|
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];
|
|
|
|
|
|
|
|
systemd.services.wicd = {
|
|
|
|
after = [ "network-pre.target" ];
|
|
|
|
before = [ "network.target" ];
|
|
|
|
wants = [ "network.target" ];
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
script = "${pkgs.wicd}/sbin/wicd -f";
|
|
|
|
};
|
|
|
|
|
|
|
|
services.dbus.enable = true;
|
|
|
|
services.dbus.packages = [pkgs.wicd];
|
|
|
|
};
|
|
|
|
}
|