Loading lib/strings.nix +14 −0 Original line number Diff line number Diff line Loading @@ -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. Loading lib/tests/misc.nix +5 −0 Original line number Diff line number Diff line Loading @@ -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" ]; Loading maintainers/maintainer-list.nix +6 −0 Original line number Diff line number Diff line Loading @@ -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"; Loading nixos/modules/hardware/all-firmware.nix +5 −19 Original line number Diff line number Diff line Loading @@ -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`."; }; }; Loading @@ -65,7 +52,6 @@ in { ++ optionals (versionOlder config.boot.kernelPackages.kernel.version "4.13") [ rtl8723bs-firmware ]; hardware.wirelessRegulatoryDatabase = true; }) (mkIf cfg.enableAllFirmware { assertions = [{ Loading nixos/modules/services/monitoring/smartd.nix +1 −1 Original line number Diff line number Diff line Loading @@ -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 Loading
lib/strings.nix +14 −0 Original line number Diff line number Diff line Loading @@ -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. Loading
lib/tests/misc.nix +5 −0 Original line number Diff line number Diff line Loading @@ -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" ]; Loading
maintainers/maintainer-list.nix +6 −0 Original line number Diff line number Diff line Loading @@ -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"; Loading
nixos/modules/hardware/all-firmware.nix +5 −19 Original line number Diff line number Diff line Loading @@ -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`."; }; }; Loading @@ -65,7 +52,6 @@ in { ++ optionals (versionOlder config.boot.kernelPackages.kernel.version "4.13") [ rtl8723bs-firmware ]; hardware.wirelessRegulatoryDatabase = true; }) (mkIf cfg.enableAllFirmware { assertions = [{ Loading
nixos/modules/services/monitoring/smartd.nix +1 −1 Original line number Diff line number Diff line Loading @@ -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