nixpkgs-suyu/nixos/modules/services/networking/iwd.nix

35 lines
860 B
Nix
Raw Normal View History

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 ];
systemd.services.iwd = {
description = "Wireless daemon";
before = [ "network.target" ];
wants = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
2018-03-07 19:05:08 +01:00
serviceConfig.ExecStart = "${pkgs.iwd}/libexec/iwd";
2017-04-23 23:12:21 +02:00
};
};
meta.maintainers = with lib.maintainers; [ mic92 ];
}