uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
71
nixos/modules/services/networking/iwd.nix
Normal file
71
nixos/modules/services/networking/iwd.nix
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
inherit (lib)
|
||||
mkEnableOption mkIf mkOption types
|
||||
recursiveUpdate;
|
||||
|
||||
cfg = config.networking.wireless.iwd;
|
||||
ini = pkgs.formats.ini { };
|
||||
defaults = {
|
||||
# without UseDefaultInterface, sometimes wlan0 simply goes AWOL with NetworkManager
|
||||
# https://iwd.wiki.kernel.org/interface_lifecycle#interface_management_in_iwd
|
||||
General.UseDefaultInterface = with config.networking.networkmanager; (enable && (wifi.backend == "iwd"));
|
||||
};
|
||||
configFile = ini.generate "main.conf" (recursiveUpdate defaults cfg.settings);
|
||||
|
||||
in
|
||||
{
|
||||
options.networking.wireless.iwd = {
|
||||
enable = mkEnableOption "iwd";
|
||||
|
||||
settings = mkOption {
|
||||
type = ini.type;
|
||||
default = { };
|
||||
|
||||
example = {
|
||||
Settings.AutoConnect = true;
|
||||
|
||||
Network = {
|
||||
EnableIPv6 = true;
|
||||
RoutePriorityOffset = 300;
|
||||
};
|
||||
};
|
||||
|
||||
description = ''
|
||||
Options passed to iwd.
|
||||
See <link xlink:href="https://iwd.wiki.kernel.org/networkconfigurationsettings">here</link> for supported options.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
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.
|
||||
'';
|
||||
}];
|
||||
|
||||
environment.etc."iwd/${configFile.name}".source = configFile;
|
||||
|
||||
# for iwctl
|
||||
environment.systemPackages = [ pkgs.iwd ];
|
||||
|
||||
services.dbus.packages = [ pkgs.iwd ];
|
||||
|
||||
systemd.packages = [ pkgs.iwd ];
|
||||
|
||||
systemd.network.links."80-iwd" = {
|
||||
matchConfig.Type = "wlan";
|
||||
linkConfig.NamePolicy = "keep kernel";
|
||||
};
|
||||
|
||||
systemd.services.iwd = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
restartTriggers = [ configFile ];
|
||||
};
|
||||
};
|
||||
|
||||
meta.maintainers = with lib.maintainers; [ mic92 dtzWill ];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue