mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-11 08:13:04 +00:00
3722f1d20e
This is needed for the wired service ead.service. (in ReadWritePaths)
35 lines
828 B
Nix
35 lines
828 B
Nix
{ 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.packages = [ pkgs.iwd ];
|
|
|
|
systemd.services.iwd.wantedBy = [ "multi-user.target" ];
|
|
|
|
systemd.tmpfiles.rules = [
|
|
"d /var/lib/iwd 0700 root root -"
|
|
"d /var/lib/ead 0700 root root -"
|
|
];
|
|
};
|
|
|
|
meta.maintainers = with lib.maintainers; [ mic92 ];
|
|
}
|