2017-04-23 23:12:21 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.networking.wireless.iwd;
|
|
|
|
in {
|
|
|
|
options.networking.wireless.iwd.enable = mkEnableOption "iwd";
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
assertions = [{
|
|
|
|
assertion = !config.networking.wireless.enable;
|
|
|
|
message = ''
|
|
|
|
Only one wireless daemon is allowed at the time: networking.wireless.enable and networking.wireless.iwd.enable are mutually exclusive.
|
|
|
|
'';
|
|
|
|
}];
|
|
|
|
|
|
|
|
# for iwctl
|
|
|
|
environment.systemPackages = [ pkgs.iwd ];
|
|
|
|
|
|
|
|
services.dbus.packages = [ pkgs.iwd ];
|
|
|
|
|
2018-08-25 14:26:52 +02:00
|
|
|
systemd.packages = [ pkgs.iwd ];
|
2018-07-01 11:58:19 +02:00
|
|
|
|
2018-09-23 14:26:55 +02:00
|
|
|
systemd.services.iwd.wantedBy = [ "multi-user.target" ];
|
|
|
|
|
2018-07-01 11:58:19 +02:00
|
|
|
systemd.tmpfiles.rules = [
|
|
|
|
"d /var/lib/iwd 0700 root root -"
|
2019-09-06 17:32:40 +02:00
|
|
|
"d /var/lib/ead 0700 root root -"
|
2018-07-01 11:58:19 +02:00
|
|
|
];
|
2017-04-23 23:12:21 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
meta.maintainers = with lib.maintainers; [ mic92 ];
|
|
|
|
}
|