···275275276276In that case, `numpy` is chosen from the generic `python3Packages`.
277277278278+## Overriding a test {#sec-override-nixos-test}
279279+280280+The NixOS test framework returns tests with multiple overriding methods.
281281+282282+`overrideTestDerivation` *function*
283283+: Like applying `overrideAttrs` on the [test](#test-opt-test) derivation.
284284+285285+ This is a convenience for `extend` with an override on the [`rawTestDerivationArg`](#test-opt-rawTestDerivationArg) option.
286286+287287+ *function*
288288+ : An extension function, e.g. `finalAttrs: prevAttrs: { /* … */ }`, the result of which is passed to [`mkDerivation`](https://nixos.org/manual/nixpkgs/stable/#sec-using-stdenv).
289289+ Just as with `overrideAttrs`, an abbreviated form can be used, e.g. `prevAttrs: { /* … */ }` or even `{ /* … */ }`.
290290+ See [`lib.extends`](https://nixos.org/manual/nixpkgs/stable/#function-library-lib.fixedPoints.extends).
291291+292292+`extendNixOS { module = ` *module* `; specialArgs = ` *specialArgs* `; }`
293293+: Evaluates the test with additional NixOS modules and/or arguments.
294294+295295+ `module`
296296+ : A NixOS module to add to all the nodes in the test. Sets test option [`extraBaseModules`](#test-opt-extraBaseModules).
297297+298298+ `specialArgs`
299299+ : An attribute set of arguments to pass to all NixOS modules. These override the existing arguments, as well as any `_module.args.<name>` that the modules may define. Sets test option [`node.specialArgs`](#test-opt-node.specialArgs).
300300+301301+ This is a convenience function for `extend` that overrides the aforementioned test options.
302302+303303+ :::{.example #ex-nixos-test-extendNixOS}
304304+305305+ # Using extendNixOS in `passthru.tests` to make `(openssh.tests.overrideAttrs f).tests.nixos` coherent
306306+307307+ ```nix
308308+ mkDerivation (finalAttrs: {
309309+ # …
310310+ passthru = {
311311+ tests = {
312312+ nixos = nixosTests.openssh.extendNixOS {
313313+ module = {
314314+ services.openssh.package = finalAttrs.finalPackage;
315315+ };
316316+ };
317317+ };
318318+ };
319319+ })
320320+ ```
321321+ :::
322322+323323+`extend { modules = ` *modules* `; specialArgs = ` *specialArgs* `; }`
324324+: Adds new `nixosTest` modules and/or module arguments to the test, which are evaluated together with the existing modules and [built-in options](#sec-test-options-reference).
325325+326326+ If you're only looking to extend the _NixOS_ configurations of the test, and not something else about the test, you may use the `extendNixOS` convenience function instead.
327327+328328+ `modules`
329329+ : A list of modules to add to the test. These are added to the existing modules and then [evaluated](https://nixos.org/manual/nixpkgs/stable/index.html#module-system-lib-evalModules) together.
330330+331331+ `specialArgs`
332332+ : An attribute of arguments to pass to the test. These override the existing arguments, as well as any `_module.args.<name>` that the modules may define. See [`evalModules`/`specialArgs`](https://nixos.org/manual/nixpkgs/stable/#module-system-lib-evalModules-param-specialArgs).
333333+278334## Test Options Reference {#sec-test-options-reference}
279335280336The following options can be used when writing tests.
···112112113113- `services.ntpd-rs` now performs configuration validation.
114114115115+- `services.monero` now includes the `environmentFile` option for adding secrets to the Monero daemon config.
116116+115117- `amdgpu` kernel driver overdrive mode can now be enabled by setting [hardware.amdgpu.overdrive.enable](#opt-hardware.amdgpu.overdrive.enable) and customized through [hardware.amdgpu.overdrive.ppfeaturemask](#opt-hardware.amdgpu.overdrive.ppfeaturemask).
116118 This allows for fine-grained control over the GPU's performance and maybe required by overclocking softwares like Corectrl and Lact. These new options replace old options such as {option}`programs.corectrl.gpuOverclock.enable` and {option}`programs.tuxclocker.enableAMD`.
117119
···161161 autoMount = lib.mkOption {
162162 type = lib.types.bool;
163163 default = false;
164164- description = "Whether Kubo should try to mount /ipfs and /ipns at startup.";
164164+ description = "Whether Kubo should try to mount /ipfs, /ipns and /mfs at startup.";
165165 };
166166167167 autoMigrate = lib.mkOption {
···236236 default = "/ipns";
237237 description = "Where to mount the IPNS namespace to";
238238 };
239239+240240+ Mounts.MFS = lib.mkOption {
241241+ type = lib.types.str;
242242+ default = "/mfs";
243243+ description = "Where to mount the MFS namespace to";
244244+ };
239245 };
240246 };
241247 description = ''
···356362 ${cfg.dataDir}.d = defaultConfig;
357363 ${cfg.settings.Mounts.IPFS}.d = lib.mkIf (cfg.autoMount) defaultConfig;
358364 ${cfg.settings.Mounts.IPNS}.d = lib.mkIf (cfg.autoMount) defaultConfig;
365365+ ${cfg.settings.Mounts.MFS}.d = lib.mkIf (cfg.autoMount) defaultConfig;
359366 };
360367361368 # The hardened systemd unit breaks the fuse-mount function according to documentation in the unit file itself
···401408 ipfs --offline config replace -
402409 '';
403410 postStop = lib.mkIf cfg.autoMount ''
404404- # After an unclean shutdown the fuse mounts at cfg.settings.Mounts.IPFS and cfg.settings.Mounts.IPNS are locked
405405- umount --quiet '${cfg.settings.Mounts.IPFS}' '${cfg.settings.Mounts.IPNS}' || true
411411+ # After an unclean shutdown the fuse mounts at cfg.settings.Mounts.IPFS, cfg.settings.Mounts.IPNS and cfg.settings.Mounts.MFS are locked
412412+ umount --quiet '${cfg.settings.Mounts.IPFS}' '${cfg.settings.Mounts.IPNS}' '${cfg.settings.Mounts.MFS}' || true
406413 '';
407414 serviceConfig = {
408415 ExecStart = [
+33-1
nixos/modules/services/networking/monero.nix
···226226 '';
227227 };
228228229229+ environmentFile = lib.mkOption {
230230+ type = lib.types.nullOr lib.types.path;
231231+ default = null;
232232+ example = "/var/lib/monero/monerod.env";
233233+ description = ''
234234+ Path to an EnvironmentFile for the monero service as defined in {manpage}`systemd.exec(5)`.
235235+236236+ Secrets may be passed to the service by specifying placeholder variables in the Nix config
237237+ and setting values in the environment file.
238238+239239+ Example:
240240+241241+ ```
242242+ # In environment file:
243243+ MINING_ADDRESS=888tNkZrPN6JsEgekjMnABU4TBzc2Dt29EPAvkRxbANsAnjyPbb3iQ1YBRk1UXcdRsiKc9dhwMVgN5S9cQUiyoogDavup3H
244244+ ```
245245+246246+ ```
247247+ # Service config
248248+ services.monero.mining.address = "$MINING_ADDRESS";
249249+ ```
250250+ '';
251251+ };
252252+229253 extraConfig = lib.mkOption {
230254 type = lib.types.lines;
231255 default = "";
···257281 after = [ "network.target" ];
258282 wantedBy = [ "multi-user.target" ];
259283284284+ preStart = ''
285285+ umask 077
286286+ ${pkgs.envsubst}/bin/envsubst \
287287+ -i ${configFile} \
288288+ -o ${cfg.dataDir}/monerod.conf
289289+ '';
290290+260291 serviceConfig = {
261292 User = "monero";
262293 Group = "monero";
263263- ExecStart = "${lib.getExe' pkgs.monero-cli "monerod"} --config-file=${configFile} --non-interactive";
294294+ EnvironmentFile = lib.mkIf (cfg.environmentFile != null) [ cfg.environmentFile ];
295295+ ExecStart = "${lib.getExe' pkgs.monero-cli "monerod"} --config-file=${cfg.dataDir}/monerod.conf --non-interactive";
264296 Restart = "always";
265297 SuccessExitStatus = [
266298 0
+38-5
nixos/tests/kubo/kubo-fuse.nix
···2727 testScript = ''
2828 start_all()
29293030- with subtest("FUSE mountpoint"):
3131- machine.fail("echo a | su bob -l -c 'ipfs add --quieter'")
3030+ with subtest("Create a file for testing"):
3131+ machine.succeed("echo 'fnord3' > /tmp/test.txt")
3232+3333+3434+ with subtest("/ipfs/ FUSE mountpoint"):
3535+ machine.fail("su bob -l -c 'ipfs add --quieter' < /tmp/test.txt")
3236 # The FUSE mount functionality is broken as of v0.13.0. This is still the case with v0.29.0.
3337 # See https://github.com/ipfs/kubo/issues/9044.
3438 # Workaround: using CID Version 1 avoids that.
···3640 "echo fnord3 | su alice -l -c 'ipfs add --quieter --cid-version=1'"
3741 ).strip()
38423939- machine.succeed(f"cat /ipfs/{ipfs_hash} | grep fnord3")
4343+ machine.succeed(f"diff /tmp/test.txt /ipfs/{ipfs_hash}")
4444+4545+4646+ with subtest("/mfs/ FUSE mountpoint"):
4747+ with subtest("Write the test file in three different ways"):
4848+ machine.succeed("cp /tmp/test.txt /mfs/test-1.txt")
4949+ machine.succeed("su alice -c 'ipfs files write --create /test-2.txt < /tmp/test.txt'")
5050+ machine.succeed(f"ipfs files cp /ipfs/{ipfs_hash} /test-3.txt")
5151+5252+ with subtest("Show the files (for debugging)"):
5353+ # Different hashes for the different ways of adding the file to the MFS probably come from different linking structures of the merkle tree. Copying the file to /mfs with `cp` is even non-deterministic.
5454+ machine.succeed("ipfs files ls --long >&2")
5555+ machine.succeed("ls -l /mfs >&2")
5656+5757+ with subtest("Check that everyone has permission to read the file (because of Mounts.FuseAllowOther)"):
5858+ machine.succeed("su alice -c 'cat /mfs/test-1.txt' | grep fnord3")
5959+ machine.succeed("su bob -c 'cat /mfs/test-1.txt' | grep fnord3")
6060+6161+ with subtest("Check the file contents"):
6262+ machine.succeed("diff /tmp/test.txt /mfs/test-1.txt")
6363+ machine.succeed("diff /tmp/test.txt /mfs/test-2.txt")
6464+ machine.succeed("diff /tmp/test.txt /mfs/test-3.txt")
6565+6666+ with subtest("Check the CID extended attribute"):
6767+ output = machine.succeed(
6868+ "getfattr --only-values --name=ipfs_cid /mfs/test-3.txt"
6969+ ).strip()
7070+ assert ipfs_hash == output, f"Expected {ipfs_hash} but got {output}"
40714141- with subtest("Unmounting of /ipns and /ipfs"):
7272+7373+ with subtest("Unmounting of /ipns, /ipfs and /mfs"):
4274 # Force Kubo to crash and wait for it to restart
4375 machine.systemctl("kill --signal=SIGKILL ipfs.service")
4476 machine.wait_for_unit("ipfs.service", timeout = 30)
45774646- machine.succeed(f"cat /ipfs/{ipfs_hash} | grep fnord3")
7878+ machine.succeed(f"diff /tmp/test.txt /ipfs/{ipfs_hash}")
7979+ machine.succeed("diff /tmp/test.txt /mfs/test-3.txt")
4780 '';
4881}
···8899buildGoModule rec {
1010 pname = "kubo";
1111- version = "0.34.1"; # When updating, also check if the repo version changed and adjust repoVersion below
1111+ version = "0.35.0"; # When updating, also check if the repo version changed and adjust repoVersion below
1212 rev = "v${version}";
13131414 passthru.repoVersion = "16"; # Also update kubo-migrator when changing the repo version
···1616 # Kubo makes changes to its source tarball that don't match the git source.
1717 src = fetchurl {
1818 url = "https://github.com/ipfs/kubo/releases/download/${rev}/kubo-source.tar.gz";
1919- hash = "sha256-wrAnmPfls7LFO3gQBISSmn4ucuUVmzvYEoz+eVc/A5M=";
1919+ hash = "sha256-OubXaa2JWbEaakDV6pExm5PkiZ5XPd9uG+S4KwWb0xQ=";
2020 };
21212222 # tarball contains multiple files/directories
···11{
22 lib,
33+ stdenv,
34 fetchFromGitHub,
45 buildPythonPackage,
56 pythonOlder,
···3132 pname = "valkey";
3233 version = "6.1.0";
3334 pyproject = true;
3434-3535- disabled = pythonOlder "3.7";
36353736 src = fetchFromGitHub {
3837 owner = "valkey-io";
···78777978 pytestFlagsArray = [ "-m 'not onlycluster and not ssl'" ];
80798181- disabledTests = [
8282- # valkey.sentinel.MasterNotFoundError: No master found for 'valkey-py-test'
8383- "test_get_from_cache"
8484- "test_cache_decode_response"
8585- # Expects another valkey instance on port 6380 *shrug*
8686- "test_psync"
8080+ disabledTests =
8181+ [
8282+ # valkey.sentinel.MasterNotFoundError: No master found for 'valkey-py-test'
8383+ "test_get_from_cache"
8484+ "test_cache_decode_response"
8585+ # Expects another valkey instance on port 6380 *shrug*
8686+ "test_psync"
8787+ ]
8888+ ++ lib.optionals stdenv.hostPlatform.isDarwin [
8989+ # OSError: AF_UNIX path too long
9090+ "test_uds_connect"
9191+ "test_network_connection_failure"
9292+ ];
9393+9494+ disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [
9595+ # AttributeError: Can't get local object 'TestMultiprocessing.test_valkey_client.<locals>.target'
9696+ "tests/test_multiprocessing.py"
8797 ];
88988989- meta = with lib; {
9999+ __darwinAllowLocalNetworking = true;
100100+101101+ meta = {
90102 description = "Python client for Redis key-value store";
91103 homepage = "https://github.com/valkey-io/valkey-py";
92104 changelog = "https://github.com/valkey-io/valkey-py/releases/tag/${src.tag}";
9393- license = with licenses; [ mit ];
9494- maintainers = with maintainers; [ hexa ];
105105+ license = lib.licenses.mit;
106106+ maintainers = with lib.maintainers; [ hexa ];
95107 };
96108}
+7
pkgs/os-specific/linux/kernel/common-config.nix
···435435 ATH10K_DFS_CERTIFIED = option yes;
436436 B43_PHY_HT = option yes;
437437 BCMA_HOST_PCI = option yes;
438438+439439+ # Enable "untested" hardware support for RTL8xxxU.
440440+ # There's a bunch of those still floating around,
441441+ # and given how old the hardware is, we're unlikely
442442+ # to kill any, so let's enable all known device IDs.
443443+ RTL8XXXU_UNTESTED = option yes;
444444+438445 RTW88 = module;
439446 RTW88_8822BE = lib.mkMerge [
440447 (whenOlder "5.8" yes)