diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2021-07-27 18:01:01 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-27 18:01:01 +0000 |
commit | db6a26db02044f51f34029f43f4a585ff555e669 (patch) | |
tree | 8947fad04b6bb1794606e14813ed9307764d7422 /nixos | |
parent | 2692c2e4277b0b1b3b01299462f238efccba91e2 (diff) | |
parent | 407ef1dc6f91f9ecf7f61e4dfaedcde052f2bd17 (diff) | |
download | nixpkgs-db6a26db02044f51f34029f43f4a585ff555e669.tar nixpkgs-db6a26db02044f51f34029f43f4a585ff555e669.tar.gz nixpkgs-db6a26db02044f51f34029f43f4a585ff555e669.tar.bz2 nixpkgs-db6a26db02044f51f34029f43f4a585ff555e669.tar.lz nixpkgs-db6a26db02044f51f34029f43f4a585ff555e669.tar.xz nixpkgs-db6a26db02044f51f34029f43f4a585ff555e669.tar.zst nixpkgs-db6a26db02044f51f34029f43f4a585ff555e669.zip |
Merge master into staging-next
Diffstat (limited to 'nixos')
7 files changed, 36 insertions, 5 deletions
diff --git a/nixos/doc/manual/development/linking-nixos-tests-to-packages.section.md b/nixos/doc/manual/development/linking-nixos-tests-to-packages.section.md new file mode 100644 index 00000000000..38a64027f7c --- /dev/null +++ b/nixos/doc/manual/development/linking-nixos-tests-to-packages.section.md @@ -0,0 +1,6 @@ +# Linking NixOS tests to packages {#sec-linking-nixos-tests-to-packages} + +You can link NixOS module tests to the packages that they exercised, +so that the tests can be run automatically during code review when the package gets changed. +This is +[described in the nixpkgs manual](https://nixos.org/manual/nixpkgs/stable/#ssec-nixos-tests-linking). diff --git a/nixos/doc/manual/development/nixos-tests.xml b/nixos/doc/manual/development/nixos-tests.xml index 702fc03f668..67dc09fc715 100644 --- a/nixos/doc/manual/development/nixos-tests.xml +++ b/nixos/doc/manual/development/nixos-tests.xml @@ -16,4 +16,5 @@ xlink:href="https://github.com/NixOS/nixpkgs/tree/master/nixos/tests">nixos/test <xi:include href="../from_md/development/writing-nixos-tests.section.xml" /> <xi:include href="../from_md/development/running-nixos-tests.section.xml" /> <xi:include href="../from_md/development/running-nixos-tests-interactively.section.xml" /> + <xi:include href="../from_md/development/linking-nixos-tests-to-packages.section.xml" /> </chapter> diff --git a/nixos/doc/manual/from_md/development/linking-nixos-tests-to-packages.section.xml b/nixos/doc/manual/from_md/development/linking-nixos-tests-to-packages.section.xml new file mode 100644 index 00000000000..666bbec6162 --- /dev/null +++ b/nixos/doc/manual/from_md/development/linking-nixos-tests-to-packages.section.xml @@ -0,0 +1,10 @@ +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="sec-linking-nixos-tests-to-packages"> + <title>Linking NixOS tests to packages</title> + <para> + You can link NixOS module tests to the packages that they exercised, + so that the tests can be run automatically during code review when + the package gets changed. This is + <link xlink:href="https://nixos.org/manual/nixpkgs/stable/#ssec-nixos-tests-linking">described + in the nixpkgs manual</link>. + </para> +</section> diff --git a/nixos/modules/hardware/all-firmware.nix b/nixos/modules/hardware/all-firmware.nix index 3e88a4c20ad..524dae57010 100644 --- a/nixos/modules/hardware/all-firmware.nix +++ b/nixos/modules/hardware/all-firmware.nix @@ -35,6 +35,14 @@ in { ''; }; + hardware.wirelessRegulatoryDatabase = mkOption { + default = false; + type = types.bool; + description = '' + Load the wireless regulatory database at boot. + ''; + }; + }; @@ -58,6 +66,7 @@ in { ++ optionals (versionOlder config.boot.kernelPackages.kernel.version "4.13") [ rtl8723bs-firmware ]; + hardware.wirelessRegulatoryDatabase = true; }) (mkIf cfg.enableAllFirmware { assertions = [{ @@ -75,5 +84,8 @@ in { b43FirmwareCutter ] ++ optional (pkgs.stdenv.hostPlatform.isi686 || pkgs.stdenv.hostPlatform.isx86_64) facetimehd-firmware; }) + (mkIf cfg.wirelessRegulatoryDatabase { + hardware.firmware = [ pkgs.wireless-regdb ]; + }) ]; } diff --git a/nixos/modules/services/networking/networkmanager.nix b/nixos/modules/services/networking/networkmanager.nix index 4be9fc952a8..c8861171dd6 100644 --- a/nixos/modules/services/networking/networkmanager.nix +++ b/nixos/modules/services/networking/networkmanager.nix @@ -6,7 +6,6 @@ let cfg = config.networking.networkmanager; basePackages = with pkgs; [ - crda modemmanager networkmanager networkmanager-fortisslvpn @@ -414,6 +413,8 @@ in { } ]; + hardware.wirelessRegulatoryDatabase = true; + environment.etc = with pkgs; { "NetworkManager/NetworkManager.conf".source = configFile; diff --git a/nixos/modules/services/networking/wpa_supplicant.nix b/nixos/modules/services/networking/wpa_supplicant.nix index c0a4ce40760..494d21cc867 100644 --- a/nixos/modules/services/networking/wpa_supplicant.nix +++ b/nixos/modules/services/networking/wpa_supplicant.nix @@ -241,7 +241,8 @@ in { environment.systemPackages = [ package ]; services.dbus.packages = [ package ]; - services.udev.packages = [ pkgs.crda ]; + + hardware.wirelessRegulatoryDatabase = true; # FIXME: start a separate wpa_supplicant instance per interface. systemd.services.wpa_supplicant = let diff --git a/nixos/modules/tasks/filesystems.nix b/nixos/modules/tasks/filesystems.nix index d9f7ce5d2c3..ea13d396c46 100644 --- a/nixos/modules/tasks/filesystems.nix +++ b/nixos/modules/tasks/filesystems.nix @@ -333,15 +333,15 @@ in set -eu # if the pstore module is builtin it will have mounted the persistent store automatically. it may also be already mounted for other reasons. ${pkgs.util-linux}/bin/mountpoint -q /sys/fs/pstore || ${pkgs.util-linux}/bin/mount -t pstore -o nosuid,noexec,nodev pstore /sys/fs/pstore - # wait up to five seconds (arbitrary, happened within one in testing) for the backend to be registered and the files to appear. a systemd path unit cannot detect this happening; and succeeding after a restart would not start dependent units. - TRIES=50 + # wait up to 1.5 seconds for the backend to be registered and the files to appear. a systemd path unit cannot detect this happening; and succeeding after a restart would not start dependent units. + TRIES=15 while [ "$(cat /sys/module/pstore/parameters/backend)" = "(null)" ]; do if (( $TRIES )); then sleep 0.1 TRIES=$((TRIES-1)) else echo "Persistent Storage backend was not registered in time." >&2 - exit 1 + break fi done ''; |