Skip to content

Commit 3029205

Browse files
committed
Merge remote-tracking branch 'origin/master' into staging-next
2 parents 7e259ce + ab36ef1 commit 3029205

File tree

75 files changed

+1053
-348
lines changed

Some content is hidden

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

75 files changed

+1053
-348
lines changed

.github/workflows/eval.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,11 @@ jobs:
171171
run: |
172172
# Get the latest eval.yml workflow run for the PR's target commit
173173
if ! run=$(gh api --method GET /repos/"$REPOSITORY"/actions/workflows/eval.yml/runs \
174-
-f head_sha="$BASE_SHA" -f event=push \
174+
-f head_sha="$TARGET_SHA" -f event=push \
175175
--jq '.workflow_runs | sort_by(.run_started_at) | .[-1]') \
176176
|| [[ -z "$run" ]]; then
177-
echo "Could not find an eval.yml workflow run for $BASE_SHA, cannot make comparison"
178-
exit 0
177+
echo "Could not find an eval.yml workflow run for $TARGET_SHA, cannot make comparison"
178+
exit 1
179179
fi
180180
echo "Comparing against $(jq .html_url <<< "$run")"
181181
runId=$(jq .id <<< "$run")
@@ -189,13 +189,13 @@ jobs:
189189
190190
if [[ "$conclusion" != "success" ]]; then
191191
echo "Workflow was not successful (conclusion: $conclusion), cannot make comparison"
192-
exit 0
192+
exit 1
193193
fi
194194
195195
echo "targetRunId=$runId" >> "$GITHUB_OUTPUT"
196196
env:
197197
REPOSITORY: ${{ github.repository }}
198-
BASE_SHA: ${{ needs.attrs.outputs.targetSha }}
198+
TARGET_SHA: ${{ needs.attrs.outputs.targetSha }}
199199
GH_TOKEN: ${{ github.token }}
200200

201201
- uses: actions/download-artifact@v4

maintainers/maintainer-list.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5974,6 +5974,12 @@
59745974
githubId = 523628;
59755975
name = "Jonathan Strickland";
59765976
};
5977+
djds = {
5978+
email = "[email protected]";
5979+
github = "djds";
5980+
githubId = 4218822;
5981+
name = "djds";
5982+
};
59775983
Dje4321 = {
59785984
email = "[email protected]";
59795985
github = "dje4321";

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@
149149

150150
- [git-worktree-switcher](https://github.com/mateusauler/git-worktree-switcher), switch between git worktrees with speed. Available as [programs.git-worktree-switcher](#opt-programs.git-worktree-switcher.enable)
151151

152+
- [GLPI-Agent](https://github.com/glpi-project/glpi-agent), GLPI Agent. Available as [services.glpiAgent](options.html#opt-services.glpiAgent.enable).
153+
152154
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
153155

154156
## Backward Incompatibilities {#sec-release-25.05-incompatibilities}

nixos/modules/module-list.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -925,6 +925,7 @@
925925
./services/monitoring/gatus.nix
926926
./services/monitoring/gitwatch.nix
927927
./services/monitoring/glances.nix
928+
./services/monitoring/glpi-agent.nix
928929
./services/monitoring/goss.nix
929930
./services/monitoring/grafana-agent.nix
930931
./services/monitoring/grafana-image-renderer.nix

nixos/modules/services/blockchain/ethereum/geth.nix

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,8 @@ let
126126
network = lib.mkOption {
127127
type = lib.types.nullOr (
128128
lib.types.enum [
129-
"goerli"
130129
"holesky"
131-
"rinkeby"
132-
"yolov2"
133-
"ropsten"
130+
"sepolia"
134131
]
135132
);
136133
default = null;
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
{
2+
config,
3+
lib,
4+
pkgs,
5+
utils,
6+
...
7+
}:
8+
9+
let
10+
cfg = config.services.recyclarr;
11+
format = pkgs.formats.yaml { };
12+
stateDir = "/var/lib/recyclarr";
13+
configPath = "${stateDir}/config.json";
14+
in
15+
{
16+
options.services.recyclarr = {
17+
enable = lib.mkEnableOption "recyclarr service";
18+
19+
package = lib.mkPackageOption pkgs "recyclarr" { };
20+
21+
configuration = lib.mkOption {
22+
type = format.type;
23+
default = { };
24+
example = {
25+
sonarr = [
26+
{
27+
instance_name = "main";
28+
base_url = "http://localhost:8989";
29+
api_key = {
30+
_secret = "/run/credentials/recyclarr.service/sonarr-api_key";
31+
};
32+
}
33+
];
34+
radarr = [
35+
{
36+
instance_name = "main";
37+
base_url = "http://localhost:7878";
38+
api_key = {
39+
_secret = "/run/credentials/recyclarr.service/radarr-api_key";
40+
};
41+
}
42+
];
43+
};
44+
description = lib.mdDoc ''
45+
Recyclarr YAML configuration as a Nix attribute set.
46+
47+
For detailed configuration options and examples, see the
48+
[official configuration reference](https://recyclarr.dev/wiki/yaml/config-reference/).
49+
50+
The configuration is processed using [utils.genJqSecretsReplacementSnippet](https://github.com/NixOS/nixpkgs/blob/master/nixos/lib/utils.nix#L232-L331) to handle secret substitution.
51+
52+
To avoid permission issues, secrets should be provided via systemd's credential mechanism:
53+
54+
```nix
55+
systemd.services.recyclarr.serviceConfig.LoadCredential = [
56+
"radarr-api_key:''${config.sops.secrets.radarr-api_key.path}"
57+
];
58+
'';
59+
};
60+
61+
schedule = lib.mkOption {
62+
type = lib.types.str;
63+
default = "daily";
64+
description = "When to run recyclarr in systemd calendar format.";
65+
};
66+
67+
command = lib.mkOption {
68+
type = lib.types.str;
69+
default = "sync";
70+
description = "The recyclarr command to run (e.g., sync).";
71+
};
72+
73+
user = lib.mkOption {
74+
type = lib.types.str;
75+
default = "recyclarr";
76+
description = "User account under which recyclarr runs.";
77+
};
78+
79+
group = lib.mkOption {
80+
type = lib.types.str;
81+
default = "recyclarr";
82+
description = "Group under which recyclarr runs.";
83+
};
84+
};
85+
86+
config = lib.mkIf cfg.enable {
87+
88+
users.users = lib.mkIf (cfg.user == "recyclarr") {
89+
recyclarr = {
90+
isSystemUser = true;
91+
description = "recyclarr user";
92+
home = stateDir;
93+
group = cfg.group;
94+
};
95+
};
96+
97+
users.groups = lib.mkIf (cfg.group == "recyclarr") {
98+
${cfg.group} = { };
99+
};
100+
101+
systemd.services.recyclarr = {
102+
description = "Recyclarr Service";
103+
104+
# YAML is a JSON super-set
105+
preStart = utils.genJqSecretsReplacementSnippet cfg.configuration configPath;
106+
107+
serviceConfig = {
108+
Type = "oneshot";
109+
User = cfg.user;
110+
Group = cfg.group;
111+
StateDirectory = "recyclarr";
112+
ExecStart = "${lib.getExe cfg.package} ${cfg.command} --app-data ${stateDir} --config ${configPath}";
113+
114+
ProtectSystem = "strict";
115+
ProtectHome = true;
116+
PrivateTmp = true;
117+
PrivateDevices = true;
118+
ProtectHostname = true;
119+
ProtectClock = true;
120+
ProtectKernelTunables = true;
121+
ProtectKernelModules = true;
122+
ProtectKernelLogs = true;
123+
ProtectControlGroups = true;
124+
125+
PrivateNetwork = false;
126+
RestrictAddressFamilies = [
127+
"AF_INET"
128+
"AF_INET6"
129+
];
130+
131+
NoNewPrivileges = true;
132+
RestrictSUIDSGID = true;
133+
RemoveIPC = true;
134+
135+
ReadWritePaths = [ stateDir ];
136+
137+
CapabilityBoundingSet = "";
138+
139+
LockPersonality = true;
140+
RestrictRealtime = true;
141+
};
142+
};
143+
144+
systemd.timers.recyclarr = {
145+
description = "Recyclarr Timer";
146+
wantedBy = [ "timers.target" ];
147+
partOf = [ "recyclarr.service" ];
148+
149+
timerConfig = {
150+
OnCalendar = cfg.schedule;
151+
Persistent = true;
152+
RandomizedDelaySec = "5m";
153+
};
154+
};
155+
};
156+
}
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
{
2+
config,
3+
lib,
4+
pkgs,
5+
...
6+
}:
7+
8+
let
9+
cfg = config.services.glpiAgent;
10+
11+
settingsType =
12+
with lib.types;
13+
attrsOf (oneOf [
14+
bool
15+
int
16+
str
17+
(listOf str)
18+
]);
19+
20+
formatValue =
21+
v:
22+
if lib.isBool v then
23+
if v then "1" else "0"
24+
else if lib.isList v then
25+
lib.concatStringsSep "," v
26+
else
27+
toString v;
28+
29+
configContent = lib.concatStringsSep "\n" (
30+
lib.mapAttrsToList (k: v: "${k} = ${formatValue v}") cfg.settings
31+
);
32+
33+
configFile = pkgs.writeText "agent.cfg" configContent;
34+
35+
in
36+
{
37+
options = {
38+
services.glpiAgent = {
39+
enable = lib.mkEnableOption "GLPI Agent";
40+
41+
package = lib.mkPackageOption pkgs "glpi-agent" { };
42+
43+
settings = lib.mkOption {
44+
type = settingsType;
45+
default = { };
46+
description = ''
47+
GLPI Agent configuration options.
48+
See https://glpi-agent.readthedocs.io/en/latest/configuration.html for all available options.
49+
50+
The 'server' option is mandatory and must point to your GLPI server.
51+
'';
52+
example = lib.literalExpression ''
53+
{
54+
server = [ "https://glpi.example.com/inventory" ];
55+
delaytime = 3600;
56+
tag = "production";
57+
logger = [ "stderr" "file" ];
58+
debug = 1;
59+
"no-category" = [ "printer" "software" ];
60+
}
61+
'';
62+
};
63+
64+
stateDir = lib.mkOption {
65+
type = lib.types.str;
66+
default = "/var/lib/glpi-agent";
67+
description = "Directory where GLPI Agent stores its state.";
68+
};
69+
};
70+
};
71+
72+
config = lib.mkIf cfg.enable {
73+
assertions = [
74+
{
75+
assertion = cfg.settings ? server;
76+
message = "GLPI Agent requires a server to be configured in services.glpiAgent.settings.server";
77+
}
78+
];
79+
80+
systemd.services.glpi-agent = {
81+
description = "GLPI Agent";
82+
wantedBy = [ "multi-user.target" ];
83+
after = [ "network.target" ];
84+
85+
serviceConfig = {
86+
ExecStart = "${lib.getExe cfg.package} --conf-file ${configFile} --vardir ${cfg.stateDir} --daemon --no-fork";
87+
Restart = "on-failure";
88+
};
89+
};
90+
};
91+
}

nixos/tests/geth.nix

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ import ./make-test-python.nix (
1515
enable = true;
1616
};
1717
};
18-
services.geth."testnet" = {
18+
19+
services.geth."holesky" = {
1920
enable = true;
2021
port = 30304;
2122
network = "holesky";
@@ -28,15 +29,31 @@ import ./make-test-python.nix (
2829
port = 18551;
2930
};
3031
};
32+
33+
services.geth."sepolia" = {
34+
enable = true;
35+
port = 30305;
36+
network = "sepolia";
37+
http = {
38+
enable = true;
39+
port = 28545;
40+
};
41+
authrpc = {
42+
enable = true;
43+
port = 28551;
44+
};
45+
};
3146
};
3247

3348
testScript = ''
3449
start_all()
3550
3651
machine.wait_for_unit("geth-mainnet.service")
37-
machine.wait_for_unit("geth-testnet.service")
52+
machine.wait_for_unit("geth-holesky.service")
53+
machine.wait_for_unit("geth-sepolia.service")
3854
machine.wait_for_open_port(8545)
3955
machine.wait_for_open_port(18545)
56+
machine.wait_for_open_port(28545)
4057
4158
machine.succeed(
4259
'geth attach --exec "eth.blockNumber" http://localhost:8545 | grep \'^0$\' '
@@ -45,6 +62,10 @@ import ./make-test-python.nix (
4562
machine.succeed(
4663
'geth attach --exec "eth.blockNumber" http://localhost:18545 | grep \'^0$\' '
4764
)
65+
66+
machine.succeed(
67+
'geth attach --exec "eth.blockNumber" http://localhost:28545 | grep \'^0$\' '
68+
)
4869
'';
4970
}
5071
)

pkgs/applications/networking/instant-messengers/discord/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ let
99
versions =
1010
if stdenv.hostPlatform.isLinux then
1111
{
12-
stable = "0.0.82";
12+
stable = "0.0.83";
1313
ptb = "0.0.128";
1414
canary = "0.0.581";
1515
development = "0.0.68";
@@ -26,7 +26,7 @@ let
2626
x86_64-linux = {
2727
stable = fetchurl {
2828
url = "https://stable.dl2.discordapp.net/apps/linux/${version}/discord-${version}.tar.gz";
29-
hash = "sha256-L8Lwe5UavmbW1s3gsSJiHjbiZnNtyEsEJzlrN0Fgc3w=";
29+
hash = "sha256-thBnSYjYa2QEHyxIhEiA73hMs/S8n808oq8IAKtA7VI=";
3030
};
3131
ptb = fetchurl {
3232
url = "https://ptb.dl2.discordapp.net/apps/linux/${version}/discord-ptb-${version}.tar.gz";

0 commit comments

Comments
 (0)