nixos/iwd: allow setting iwd package

This commit is contained in:
Nick Cao 2022-10-16 19:38:33 +08:00
parent fab6d13fe1
commit 46982f4194
No known key found for this signature in database

View file

@ -19,6 +19,15 @@ in
options.networking.wireless.iwd = {
enable = mkEnableOption (lib.mdDoc "iwd");
package = mkOption {
type = types.package;
default = pkgs.iwd;
defaultText = lib.literalExpression "pkgs.iwd";
description = lib.mdDoc ''
The iwd package to use.
'';
};
settings = mkOption {
type = ini.type;
default = { };
@ -50,11 +59,11 @@ in
environment.etc."iwd/${configFile.name}".source = configFile;
# for iwctl
environment.systemPackages = [ pkgs.iwd ];
environment.systemPackages = [ cfg.package ];
services.dbus.packages = [ pkgs.iwd ];
services.dbus.packages = [ cfg.package ];
systemd.packages = [ pkgs.iwd ];
systemd.packages = [ cfg.package ];
systemd.network.links."80-iwd" = {
matchConfig.Type = "wlan";