1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/nixos/modules/services/networking/iwd.nix

35 lines
842 B
Nix
Raw Normal View History

2017-04-23 22:12:21 +01: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 13:26:52 +01:00
systemd.packages = [ pkgs.iwd ];
2018-07-01 10:58:19 +01:00
systemd.network.links."80-iwd" = {
matchConfig.Type = "wlan";
linkConfig.NamePolicy = "keep kernel";
};
2018-09-23 13:26:55 +01:00
systemd.services.iwd.wantedBy = [ "multi-user.target" ];
2017-04-23 22:12:21 +01:00
};
meta.maintainers = with lib.maintainers; [ mic92 dtzWill ];
2017-04-23 22:12:21 +01:00
}