Unverified Commit 15059812 authored by github-actions[bot]'s avatar github-actions[bot] Committed by GitHub
Browse files

Merge master into staging-next

parents bda501a0 17012aa0
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -144,6 +144,20 @@ rec {
  */
  concatLines = concatMapStrings (s: s + "\n");

  /*
    Replicate a string n times,
    and concatenate the parts into a new string.

    Type: replicate :: int -> string -> string

    Example:
      replicate 3 "v"
      => "vvv"
      replicate 5 "hello"
      => "hellohellohellohellohello"
  */
  replicate = n: s: concatStrings (lib.lists.replicate n s);

  /* Construct a Unix-style, colon-separated search path consisting of
     the given `subDir` appended to each of the given paths.

+5 −0
Original line number Diff line number Diff line
@@ -191,6 +191,11 @@ runTests {
    expected = "a\nb\nc\n";
  };

  testReplicateString = {
    expr = strings.replicate 5 "hello";
    expected = "hellohellohellohellohello";
  };

  testSplitStringsSimple = {
    expr = strings.splitString "." "a.b.c.d";
    expected = [ "a" "b" "c" "d" ];
+6 −0
Original line number Diff line number Diff line
@@ -4215,6 +4215,12 @@
    githubId = 12224254;
    name = "Delta";
  };
  delta231 = {
    email = "swstkbaranwal@gmail.com";
    github = "Delta456";
    githubId = 28479139;
    name = "Swastik Baranwal";
  };
  deltadelta = {
    email = "contact@libellules.eu";
    name = "Dara Ly";
+5 −19
Original line number Diff line number Diff line
@@ -18,29 +18,16 @@ in {

  options = {

    hardware.enableAllFirmware = mkOption {
      default = false;
      type = types.bool;
      description = lib.mdDoc ''
        Turn on this option if you want to enable all the firmware.
      '';
    };
    hardware.enableAllFirmware = mkEnableOption "all firmware regardless of license";

    hardware.enableRedistributableFirmware = mkOption {
    hardware.enableRedistributableFirmware = mkEnableOption "firmware with a license allowing redistribution" // {
      default = config.hardware.enableAllFirmware;
      defaultText = lib.literalExpression "config.hardware.enableAllFirmware";
      type = types.bool;
      description = lib.mdDoc ''
        Turn on this option if you want to enable all the firmware with a license allowing redistribution.
      '';
    };

    hardware.wirelessRegulatoryDatabase = mkOption {
      default = false;
      type = types.bool;
      description = lib.mdDoc ''
        Load the wireless regulatory database at boot.
      '';
    hardware.wirelessRegulatoryDatabase = mkEnableOption "loading the wireless regulatory database at boot" // {
      default = cfg.enableRedistributableFirmware || cfg.enableAllFirmware;
      defaultText = literalMD "Enabled if proprietary firmware is allowed via {option}`enableRedistributableFirmware` or {option}`enableAllFirmware`.";
    };

  };
@@ -65,7 +52,6 @@ in {
        ++ optionals (versionOlder config.boot.kernelPackages.kernel.version "4.13") [
        rtl8723bs-firmware
      ];
      hardware.wirelessRegulatoryDatabase = true;
    })
    (mkIf cfg.enableAllFirmware {
      assertions = [{
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ let
      {
      ${pkgs.coreutils}/bin/cat << EOF
      From: smartd on ${host} <${nm.sender}>
      To: undisclosed-recipients:;
      To: ${nm.recipient}
      Subject: $SMARTD_SUBJECT

      $SMARTD_FULLMESSAGE
Loading