Skip to content

Commit c3fbeb4

Browse files
Merge master into staging-next
2 parents d2aa11d + d846643 commit c3fbeb4

34 files changed

Lines changed: 664 additions & 547 deletions

File tree

nixos/doc/manual/release-notes/rl-2605.section.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,8 @@ of pulling the upstream container image from Docker Hub. If you want the old beh
206206

207207
- `rocmPackages_6` has been removed. `rocmPackages` has been updated to ROCm 7.x. Out of tree packages may rely on obsolete hipblas APIs or compile time constant warp size and need to be updated.
208208

209+
- `mysql80` has been removed. Please update to `mysql84` or `mariadb`. See the [upgrade guide](https://mariadb.com/kb/en/upgrading-from-mysql-to-mariadb/) for more information.
210+
209211
- `services.prometheus.exporters.rspamd` has been removed. It relied on the Rspamd /stat endpoint via the JSON exporter. You can use the Rspamd [/metrics](https://docs.rspamd.com/developers/protocol#controller-http-endpoints) endpoint directly instead.
210212

211213
- The Bash implementation of the `nixos-rebuild` program is removed. All switchable systems now use the Python rewrite. Any prior usage of `system.rebuild.enableNg` must now be removed. If you have any outstanding issues with the new implementation, please open an issue on GitHub.

nixos/modules/services/databases/mysql.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ let
99
cfg = config.services.mysql;
1010

1111
isMariaDB = lib.getName cfg.package == lib.getName pkgs.mariadb;
12-
isOracle = lib.getName cfg.package == lib.getName pkgs.mysql80;
12+
isOracle = lib.getName cfg.package == lib.getName pkgs.mysql84;
1313
# Oracle MySQL has supported "notify" service type since 8.0
1414
hasNotify = isMariaDB || (isOracle && lib.versionAtLeast cfg.package.version "8.0");
1515

nixos/modules/services/misc/autobrr.nix

Lines changed: 54 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
let
99
cfg = config.services.autobrr;
1010
configFormat = pkgs.formats.toml { };
11-
configTemplate = configFormat.generate "autobrr.toml" cfg.settings;
12-
templaterCmd = ''${lib.getExe pkgs.dasel} put -f '${configTemplate}' -v "$(${config.systemd.package}/bin/systemd-creds cat sessionSecret)" -o %S/autobrr/config.toml "sessionSecret"'';
11+
configFile = configFormat.generate "autobrr.toml" cfg.settings;
1312
in
1413
{
1514
options = {
@@ -28,13 +27,31 @@ in
2827
};
2928

3029
settings = lib.mkOption {
31-
type = lib.types.submodule { freeformType = configFormat.type; };
32-
default = {
33-
host = "127.0.0.1";
34-
port = 7474;
35-
checkForUpdates = true;
30+
type = lib.types.submodule {
31+
freeformType = configFormat.type;
32+
options = {
33+
host = lib.mkOption {
34+
type = lib.types.str;
35+
default = "127.0.0.1";
36+
description = "The host address autobrr listens on.";
37+
};
38+
39+
port = lib.mkOption {
40+
type = lib.types.port;
41+
default = 7474;
42+
description = "The port autobrr listens on.";
43+
};
44+
45+
checkForUpdates = lib.mkOption {
46+
type = lib.types.bool;
47+
default = true;
48+
description = "Whether autobrr needs to check for updates.";
49+
};
50+
};
3651
};
52+
default = { };
3753
example = {
54+
port = 7654;
3855
logLevel = "DEBUG";
3956
};
4057
description = ''
@@ -61,26 +78,40 @@ in
6178
}
6279
];
6380

64-
systemd.services.autobrr = {
65-
description = "Autobrr";
66-
after = [
67-
"syslog.target"
68-
"network-online.target"
69-
];
70-
wants = [ "network-online.target" ];
71-
wantedBy = [ "multi-user.target" ];
81+
systemd = {
82+
tmpfiles.settings = {
83+
"10-autobrr" = {
84+
# DynamicUser uses /var/lib/private/
85+
"/var/lib/private/autobrr/config.toml"."L+" = {
86+
argument = "${configFile}";
87+
};
88+
};
89+
};
7290

73-
serviceConfig = {
74-
Type = "simple";
75-
DynamicUser = true;
76-
LoadCredential = "sessionSecret:${cfg.secretFile}";
77-
StateDirectory = "autobrr";
78-
ExecStartPre = "${lib.getExe pkgs.bash} -c '${templaterCmd}'";
79-
ExecStart = "${lib.getExe cfg.package} --config %S/autobrr";
80-
Restart = "on-failure";
91+
services.autobrr = {
92+
description = "Autobrr";
93+
after = [
94+
"syslog.target"
95+
"network-online.target"
96+
];
97+
wants = [ "network-online.target" ];
98+
wantedBy = [ "multi-user.target" ];
99+
restartTriggers = [ configFile ];
100+
101+
serviceConfig = {
102+
Type = "simple";
103+
DynamicUser = true;
104+
LoadCredential = "sessionSecret:${cfg.secretFile}";
105+
Environment = [ "AUTOBRR__SESSION_SECRET_FILE=%d/sessionSecret" ];
106+
StateDirectory = "autobrr";
107+
ExecStart = "${lib.getExe cfg.package} --config %S/autobrr";
108+
Restart = "on-failure";
109+
};
81110
};
82111
};
83112

84113
networking.firewall = lib.mkIf cfg.openFirewall { allowedTCPPorts = [ cfg.settings.port ]; };
85114
};
115+
116+
meta.maintainers = with lib.maintainers; [ av-gal ];
86117
}

nixos/modules/services/web-apps/keycloak.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ in
802802
services.mysql.enable = mkDefault createLocalMySQL;
803803
services.mysql.package =
804804
let
805-
dbPkg = if cfg.database.type == "mariadb" then pkgs.mariadb else pkgs.mysql80;
805+
dbPkg = if cfg.database.type == "mariadb" then pkgs.mariadb else pkgs.mysql84;
806806
in
807807
mkIf createLocalMySQL (mkDefault dbPkg);
808808
};

nixos/tests/autobrr.nix

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,42 @@
66

77
nodes.machine =
88
{ pkgs, ... }:
9+
let
10+
# We create this secret in the Nix store (making it readable by everyone).
11+
# DO NOT DO THIS OUTSIDE OF TESTS!!
12+
testSecretFile = pkgs.writeText "session_secret" "not-secret";
13+
in
914
{
1015
services.autobrr = {
1116
enable = true;
12-
# We create this secret in the Nix store (making it readable by everyone).
13-
# DO NOT DO THIS OUTSIDE OF TESTS!!
14-
secretFile = pkgs.writeText "session_secret" "not-secret";
17+
secretFile = testSecretFile;
18+
};
19+
20+
# Use port other than default to test if settings options work.
21+
specialisation.settingsPort.configuration = {
22+
services.autobrr = {
23+
enable = true;
24+
secretFile = testSecretFile;
25+
settings.port = 7777;
26+
};
1527
};
1628
};
1729

18-
testScript = ''
19-
machine.wait_for_unit("autobrr.service")
20-
machine.wait_for_open_port(7474)
21-
machine.succeed("curl --fail http://localhost:7474/")
22-
'';
30+
testScript =
31+
{ nodes, ... }:
32+
let
33+
settingsPort = "${nodes.machine.system.build.toplevel}/specialisation/settingsPort";
34+
in
35+
# python
36+
''
37+
def test_webui(port):
38+
machine.wait_for_unit("autobrr.service")
39+
machine.wait_for_open_port(port)
40+
machine.wait_until_succeeds(f"curl --fail http://localhost:{port}")
41+
42+
test_webui(7474)
43+
44+
machine.succeed("${settingsPort}/bin/switch-to-configuration test")
45+
test_webui(7777)
46+
'';
2347
}

nixos/tests/mysql/common.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import ../../../pkgs/servers/sql/mariadb pkgs
55
);
66
mysqlPackages = {
7-
inherit (pkgs) mysql80;
7+
inherit (pkgs) mysql84;
88
};
99
perconaPackages = {
1010
inherit (pkgs) percona-server_8_0 percona-server_8_4;

pkgs/applications/editors/vim/plugins/generated.nix

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23266,19 +23266,6 @@ final: prev: {
2326623266
meta.hydraPlatforms = [ ];
2326723267
};
2326823268

23269-
windsurf-nvim = buildVimPlugin {
23270-
pname = "windsurf.nvim";
23271-
version = "0-unstable-2025-04-30";
23272-
src = fetchFromGitHub {
23273-
owner = "Exafunction";
23274-
repo = "windsurf.nvim";
23275-
rev = "821b570b526dbb05b57aa4ded578b709a704a38a";
23276-
hash = "sha256-TWezce2+XrkzaiW/V3VgfX3FMdS8qFE8/FfPEK/Ii84=";
23277-
};
23278-
meta.homepage = "https://github.com/Exafunction/windsurf.nvim/";
23279-
meta.hydraPlatforms = [ ];
23280-
};
23281-
2328223269
windsurf-vim = buildVimPlugin {
2328323270
pname = "windsurf.vim";
2328423271
version = "1.20.8-unstable-2026-01-22";
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
{
2+
lib,
3+
codeium,
4+
fetchFromGitHub,
5+
fetchurl,
6+
jq,
7+
stdenv,
8+
vimPlugins,
9+
vimUtils,
10+
}:
11+
let
12+
# Update according to https://github.com/Exafunction/codeium.nvim/blob/main/lua/codeium/versions.json
13+
codeiumVersion = "1.20.9";
14+
codeiumHashes = {
15+
x86_64-linux = "sha256-IeNK7UQtOhqC/eQv7MAya4jB1WIGykSR7IgutZatmHM=";
16+
aarch64-linux = "sha256-ujTFki/3V79El2WCkG0PJhbaMT0knC9mrS9E7Uv9HD4=";
17+
x86_64-darwin = "sha256-r2KloEQsUku9sk8h76kwyQuMTHcq/vwfTSK2dkiXDzE=";
18+
aarch64-darwin = "sha256-1jNH0Up8mAahDgvPF6g42LV+RVDVsPqDM54lE2KYY48=";
19+
};
20+
21+
codeium' = codeium.overrideAttrs rec {
22+
version = codeiumVersion;
23+
24+
src =
25+
let
26+
inherit (stdenv.hostPlatform) system;
27+
throwSystem = throw "Unsupported system: ${system}";
28+
29+
platform =
30+
{
31+
x86_64-linux = "linux_x64";
32+
aarch64-linux = "linux_arm";
33+
x86_64-darwin = "macos_x64";
34+
aarch64-darwin = "macos_arm";
35+
}
36+
.${system} or throwSystem;
37+
38+
hash = codeiumHashes.${system} or throwSystem;
39+
in
40+
fetchurl {
41+
name = "codeium-${version}.gz";
42+
url = "https://github.com/Exafunction/codeium/releases/download/language-server-v${version}/language_server_${platform}.gz";
43+
inherit hash;
44+
};
45+
};
46+
in
47+
vimUtils.buildVimPlugin {
48+
pname = "windsurf.nvim";
49+
version = "0-unstable-2025-04-30";
50+
src = fetchFromGitHub {
51+
owner = "Exafunction";
52+
repo = "windsurf.nvim";
53+
rev = "821b570b526dbb05b57aa4ded578b709a704a38a";
54+
hash = "sha256-TWezce2+XrkzaiW/V3VgfX3FMdS8qFE8/FfPEK/Ii84=";
55+
};
56+
57+
dependencies = [ vimPlugins.plenary-nvim ];
58+
buildPhase = ''
59+
cat << EOF > lua/codeium/installation_defaults.lua
60+
return {
61+
tools = {
62+
language_server = "${codeium'}/bin/codeium_language_server"
63+
};
64+
};
65+
EOF
66+
'';
67+
68+
doCheck = true;
69+
checkInputs = [
70+
jq
71+
codeium'
72+
];
73+
checkPhase = ''
74+
runHook preCheck
75+
76+
expected_codeium_version=$(jq -r '.version' lua/codeium/versions.json)
77+
actual_codeium_version=$(codeium_language_server --version)
78+
79+
expected_codeium_stamp=$(jq -r '.stamp' lua/codeium/versions.json)
80+
actual_codeium_stamp=$(codeium_language_server --stamp | grep STABLE_BUILD_SCM_REVISION | cut -d' ' -f2)
81+
82+
if [ "$actual_codeium_stamp" != "$expected_codeium_stamp" ]; then
83+
echo "
84+
The version of codeium patched in vimPlugins.codeium-nvim is incorrect.
85+
Expected stamp: $expected_codeium_stamp
86+
Actual stamp: $actual_codeium_stamp
87+
88+
Expected codeium version: $expected_codeium_version
89+
Actual codeium version: $actual_codeium_version
90+
91+
Please, update 'codeiumVersion' in pkgs/applications/editors/vim/plugins/overrides.nix accordingly to:
92+
https://github.com/Exafunction/codeium.nvim/blob/main/lua/codeium/versions.json
93+
"
94+
exit 1
95+
fi
96+
97+
runHook postCheck
98+
'';
99+
100+
meta = {
101+
description = "Native neovim extension for Codeium";
102+
homepage = "https://github.com/Exafunction/windsurf.nvim";
103+
license = lib.licenses.mit;
104+
platforms = lib.attrNames codeiumHashes;
105+
};
106+
}

0 commit comments

Comments
 (0)