Skip to content

Commit d1034e4

Browse files
Merge master into staging-next
2 parents e813564 + ae4459d commit d1034e4

File tree

102 files changed

+1032
-709
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+1032
-709
lines changed

nixos/doc/manual/redirects.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1874,6 +1874,9 @@
18741874
"test-opt-meta.platforms": [
18751875
"index.html#test-opt-meta.platforms"
18761876
],
1877+
"test-opt-meta.hydraPlatforms": [
1878+
"index.html#test-opt-meta.hydraPlatforms"
1879+
],
18771880
"test-opt-meta.timeout": [
18781881
"index.html#test-opt-meta.timeout"
18791882
],

nixos/lib/testing/default.nix

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,13 @@ let
99
};
1010
runTest =
1111
module:
12-
# Infra issue: virtualization on darwin doesn't seem to work yet.
13-
lib.addMetaAttrs { hydraPlatforms = lib.platforms.linux; }
14-
(evalTest (
15-
{ config, ... }:
16-
{
17-
imports = [ module ];
18-
result = config.test;
19-
}
20-
)).config.result;
12+
(evalTest (
13+
{ config, ... }:
14+
{
15+
imports = [ module ];
16+
result = config.test;
17+
}
18+
)).config.result;
2119

2220
testModules = [
2321
./call-test.nix

nixos/lib/testing/meta.nix

Lines changed: 46 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,61 @@
11
{ lib, ... }:
22
let
3-
inherit (lib) types mkOption;
3+
inherit (lib) types mkOption literalMD;
44
in
55
{
66
options = {
7-
meta = lib.mkOption {
7+
meta = mkOption {
88
description = ''
99
The [`meta`](https://nixos.org/manual/nixpkgs/stable/#chap-meta) attributes that will be set on the returned derivations.
1010
1111
Not all [`meta`](https://nixos.org/manual/nixpkgs/stable/#chap-meta) attributes are supported, but more can be added as desired.
1212
'';
1313
apply = lib.filterAttrs (k: v: v != null);
14-
type = types.submodule {
15-
options = {
16-
maintainers = lib.mkOption {
17-
type = types.listOf types.raw;
18-
default = [ ];
19-
description = ''
20-
The [list of maintainers](https://nixos.org/manual/nixpkgs/stable/#var-meta-maintainers) for this test.
21-
'';
14+
type = types.submodule (
15+
{ config, ... }:
16+
{
17+
options = {
18+
maintainers = mkOption {
19+
type = types.listOf types.raw;
20+
default = [ ];
21+
description = ''
22+
The [list of maintainers](https://nixos.org/manual/nixpkgs/stable/#var-meta-maintainers) for this test.
23+
'';
24+
};
25+
timeout = mkOption {
26+
type = types.nullOr types.int;
27+
default = 3600; # 1 hour
28+
description = ''
29+
The [{option}`test`](#test-opt-test)'s [`meta.timeout`](https://nixos.org/manual/nixpkgs/stable/#var-meta-timeout) in seconds.
30+
'';
31+
};
32+
broken = mkOption {
33+
type = types.bool;
34+
default = false;
35+
description = ''
36+
Sets the [`meta.broken`](https://nixos.org/manual/nixpkgs/stable/#var-meta-broken) attribute on the [{option}`test`](#test-opt-test) derivation.
37+
'';
38+
};
39+
platforms = mkOption {
40+
type = types.listOf types.raw;
41+
default = lib.platforms.linux ++ lib.platforms.darwin;
42+
description = ''
43+
Sets the [`meta.platforms`](https://nixos.org/manual/nixpkgs/stable/#var-meta-platforms) attribute on the [{option}`test`](#test-opt-test) derivation.
44+
'';
45+
};
46+
hydraPlatforms = mkOption {
47+
type = types.listOf types.raw;
48+
# Ideally this would default to `platforms` again:
49+
# default = config.platforms;
50+
default = lib.platforms.linux;
51+
defaultText = literalMD "`lib.platforms.linux` only, as the `hydra.nixos.org` build farm does not currently support virtualisation on Darwin.";
52+
description = ''
53+
Sets the [`meta.hydraPlatforms`](https://nixos.org/manual/nixpkgs/stable/#var-meta-hydraPlatforms) attribute on the [{option}`test`](#test-opt-test) derivation.
54+
'';
55+
};
2256
};
23-
timeout = lib.mkOption {
24-
type = types.nullOr types.int;
25-
default = 3600; # 1 hour
26-
description = ''
27-
The [{option}`test`](#test-opt-test)'s [`meta.timeout`](https://nixos.org/manual/nixpkgs/stable/#var-meta-timeout) in seconds.
28-
'';
29-
};
30-
broken = lib.mkOption {
31-
type = types.bool;
32-
default = false;
33-
description = ''
34-
Sets the [`meta.broken`](https://nixos.org/manual/nixpkgs/stable/#var-meta-broken) attribute on the [{option}`test`](#test-opt-test) derivation.
35-
'';
36-
};
37-
platforms = lib.mkOption {
38-
type = types.listOf types.raw;
39-
# darwin could be added, but it would add VM tests that don't work on Hydra.nixos.org (so far)
40-
# see https://github.com/NixOS/nixpkgs/pull/303597#issuecomment-2128782362
41-
default = lib.platforms.linux;
42-
description = ''
43-
Sets the [`meta.platforms`](https://nixos.org/manual/nixpkgs/stable/#var-meta-platforms) attribute on the [{option}`test`](#test-opt-test) derivation.
44-
'';
45-
};
46-
};
47-
};
57+
}
58+
);
4859
default = { };
4960
};
5061
};

nixos/modules/services/networking/headscale.nix

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ in
164164
'';
165165
};
166166

167-
auto_update_enable = lib.mkOption {
167+
auto_update_enabled = lib.mkOption {
168168
type = lib.types.bool;
169169
default = true;
170170
description = ''
@@ -493,7 +493,11 @@ in
493493
imports = with lib; [
494494
(mkRenamedOptionModule
495495
[ "services" "headscale" "derp" "autoUpdate" ]
496-
[ "services" "headscale" "settings" "derp" "auto_update_enable" ]
496+
[ "services" "headscale" "settings" "derp" "auto_update_enabled" ]
497+
)
498+
(mkRenamedOptionModule
499+
[ "services" "headscale" "derp" "auto_update_enable" ]
500+
[ "services" "headscale" "settings" "derp" "auto_update_enabled" ]
497501
)
498502
(mkRenamedOptionModule
499503
[ "services" "headscale" "derp" "paths" ]

nixos/tests/all-tests.nix

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1424,10 +1424,6 @@ in
14241424
imports = [ ./varnish.nix ];
14251425
_module.args.package = pkgs.varnish60;
14261426
};
1427-
varnish76 = runTest {
1428-
imports = [ ./varnish.nix ];
1429-
_module.args.package = pkgs.varnish76;
1430-
};
14311427
varnish77 = runTest {
14321428
imports = [ ./varnish.nix ];
14331429
_module.args.package = pkgs.varnish77;

nixos/tests/web-apps/netbox-upgrade.nix

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
import ../make-test-python.nix (
22
{ lib, pkgs, ... }:
33
let
4-
oldNetbox = pkgs.netbox_3_7;
5-
newNetbox = pkgs.netbox_4_1;
4+
oldNetbox = "netbox_4_1";
5+
newNetbox = "netbox_4_2";
6+
7+
apiVersion =
8+
version:
9+
lib.pipe version [
10+
(lib.splitString ".")
11+
(lib.take 2)
12+
(lib.concatStringsSep ".")
13+
];
14+
oldApiVersion = apiVersion pkgs."${oldNetbox}".version;
15+
newApiVersion = apiVersion pkgs."${newNetbox}".version;
616
in
717
{
818
name = "netbox-upgrade";
@@ -15,12 +25,14 @@ import ../make-test-python.nix (
1525
};
1626

1727
nodes.machine =
18-
{ config, ... }:
28+
{ config, pkgs, ... }:
1929
{
2030
virtualisation.memorySize = 2048;
2131
services.netbox = {
2232
enable = true;
23-
package = oldNetbox;
33+
# Pick the NetBox package from this config's "pkgs" argument,
34+
# so that `nixpkgs.config.permittedInsecurePackages` works
35+
package = pkgs."${oldNetbox}";
2436
secretKeyFile = pkgs.writeText "secret" ''
2537
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
2638
'';
@@ -42,22 +54,13 @@ import ../make-test-python.nix (
4254

4355
networking.firewall.allowedTCPPorts = [ 80 ];
4456

45-
specialisation.upgrade.configuration.services.netbox.package = lib.mkForce newNetbox;
57+
nixpkgs.config.permittedInsecurePackages = [ pkgs."${oldNetbox}".name ];
58+
59+
specialisation.upgrade.configuration.services.netbox.package = lib.mkForce pkgs."${newNetbox}";
4660
};
4761

4862
testScript =
4963
{ nodes, ... }:
50-
let
51-
apiVersion =
52-
version:
53-
lib.pipe version [
54-
(lib.splitString ".")
55-
(lib.take 2)
56-
(lib.concatStringsSep ".")
57-
];
58-
oldApiVersion = apiVersion oldNetbox.version;
59-
newApiVersion = apiVersion newNetbox.version;
60-
in
6164
''
6265
start_all()
6366
machine.wait_for_unit("netbox.target")

pkgs/applications/editors/vscode/extensions/ms-dotnettools.csharp/default.nix

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ let
1717
{
1818
x86_64-linux = {
1919
arch = "linux-x64";
20-
hash = "sha256-pMcUrsIVpb0lYhonEKB/5pZG+08OhL/Py7wmkmlXWgo=";
20+
hash = "sha256-yJ4bAxIg3yfQJPWJcl6jUMwQ/ssHkstJWuEp3wr0dDA=";
2121
};
2222
aarch64-linux = {
2323
arch = "linux-arm64";
24-
hash = "sha256-dJilgYVLkx5JVHk3e3mZjW7qpWrviuB4OhtzV1DkmrI=";
24+
hash = "sha256-EpWHwansBwBD0aYoW2ek7iWFbp+s7ZH6ug3ejoSRG5U=";
2525
};
2626
x86_64-darwin = {
2727
arch = "darwin-x64";
28-
hash = "sha256-DyueVd+G67P48Oo0+HTC3Sg0/en/bRBV+F8mKuz66RY=";
28+
hash = "sha256-345hK47tyMGMJDKiujwpECDHMbRpLi17x2lH2rMX9Lg=";
2929
};
3030
aarch64-darwin = {
3131
arch = "darwin-arm64";
32-
hash = "sha256-yk6bSeaEivx8kc3fqpSJBTMxUDsJGVwMoRxPPwaHgtc=";
32+
hash = "sha256-u/vflQd285SuZ41ASd8nJgs+lN6892J3x6lPgWqVY+Y=";
3333
};
3434
}
3535
.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}")
@@ -39,7 +39,7 @@ vscode-utils.buildVscodeMarketplaceExtension {
3939
mktplcRef = {
4040
name = "csharp";
4141
publisher = "ms-dotnettools";
42-
version = "2.72.34";
42+
version = "2.76.27";
4343
inherit (extInfo) hash arch;
4444
};
4545

@@ -134,8 +134,6 @@ vscode-utils.buildVscodeMarketplaceExtension {
134134
)
135135
'';
136136

137-
passthru.updateScript = ./update.sh;
138-
139137
meta = {
140138
description = "Official C# support for Visual Studio Code";
141139
homepage = "https://github.com/dotnet/vscode-csharp";

pkgs/applications/editors/vscode/extensions/ms-dotnettools.csharp/update.sh

Lines changed: 0 additions & 46 deletions
This file was deleted.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{ buildNpmPackage, anubis }:
2+
3+
buildNpmPackage {
4+
pname = "${anubis.pname}-xess";
5+
inherit (anubis) version src;
6+
7+
npmDepsHash = "sha256-hTKTTBmfMGv6I+4YbWrOt6F+qD6ysVYi+DEC1konBFk=";
8+
9+
buildPhase = ''
10+
runHook preBuild
11+
12+
npx postcss ./xess/xess.css -o xess.min.css
13+
14+
runHook postBuild
15+
'';
16+
17+
installPhase = ''
18+
runHook preInstall
19+
20+
install -Dm644 xess.min.css $out/xess.min.css
21+
22+
runHook postInstall
23+
'';
24+
25+
meta = anubis.meta // {
26+
description = "Xess files for Anubis";
27+
longDescription = ''
28+
This package is consumed by the main `anubis` package to render the final
29+
styling for the bot check page.
30+
31+
**It is not supposed to be used as a standalone package**, and it exists to
32+
ensure Anubis' styling is override-able by downstreams.
33+
'';
34+
};
35+
}

0 commit comments

Comments
 (0)