Skip to content

Commit ae75e02

Browse files
authored
Merge pull request #65 from MagicRB/nixpkgs-update
General fixes due to rushed 25.05 update (which was also me)
2 parents 47b20ad + 4f6158c commit ae75e02

File tree

13 files changed

+117
-97
lines changed

13 files changed

+117
-97
lines changed

examples/hydra/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ nglib.makeSystem {
3838
notificationSender = "root@example.org";
3939
useSubstitutes = true;
4040
};
41-
services.postgresql.package = pkgs.postgresql_12;
41+
services.postgresql.package = pkgs.postgresql_17;
4242
services.socklog = {
4343
enable = true;
4444
unix = "/dev/log";

examples/pantalaimon/default.nix

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ nglib.makeSystem {
1212
system = "x86_64-linux";
1313
name = "nixng-pantalaimon";
1414
config = (
15-
{ pkgs, ... }:
15+
{ pkgs, lib, ... }:
1616
{
1717
dumb-init = {
1818
enable = true;
@@ -22,20 +22,11 @@ nglib.makeSystem {
2222
shutdownOnExit = true;
2323
};
2424

25+
nixpkgs.config.allowInsecurePredicate = pkg: lib.getName pkg == "olm";
26+
2527
services.pantalaimon = {
2628
enable = true;
2729

28-
package = (pkgs.pantalaimon.override { enableDbusUi = false; }).overrideAttrs (old: {
29-
version = "0.10.2";
30-
src = pkgs.fetchFromGitHub {
31-
owner = "matrix-org";
32-
repo = "pantalaimon";
33-
rev = "0.10.2";
34-
sha256 = "sha256-sjaJomKMKSZqLlKWTG7Oa87dXa5SnGQlVnrdS707A1w=";
35-
};
36-
patches = [ ];
37-
});
38-
3930
config = {
4031
Default = {
4132
LogLevel = "Debug";

examples/postfix/default.nix

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ nglib.makeSystem {
7070

7171
services.postgresql = {
7272
enable = true;
73-
package = pkgs.postgresql_12;
73+
package = pkgs.postgresql_17;
7474

7575
config = {
7676
unix_socket_directories = "/run/postgresql/, /var/spool/postfix/run/postgresql/";
@@ -238,7 +238,6 @@ nglib.makeSystem {
238238
package = pkgs.postfix.override {
239239
withPgSQL = true;
240240
withLDAP = false;
241-
postgresql = pkgs.postgresql_12;
242241
};
243242
enable = true;
244243

modules/dumb-init/default.nix

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,12 @@ in
124124
"$_system_config/activation"
125125
. /etc/profile
126126
exec ${cfg.package}/bin/dumb-init -- \
127-
${
128-
sigell [
129-
"su"
130-
"${cfg.type.shell.user}"
131-
"-c"
132-
"${userShell} \"$@\""
133-
]
134-
}
127+
${sigell [
128+
"su"
129+
"${cfg.type.shell.user}"
130+
"-c"
131+
"${userShell} \"$@\""
132+
]}
135133
'';
136134
sigell =
137135
cmd:

modules/runit/finish.nix

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,8 @@ writeShellScript "${n}-finish" ''
8383
8484
(
8585
cd ${s.workingDirectory}
86-
${
87-
lib.optionalString (s.environment != { })
88-
"export ${lib.concatStringsSep " " (lib.mapAttrsToList (n: v: "${n}=${v}") s.environment)}"
86+
${lib.optionalString (s.environment != { })
87+
"export ${lib.concatStringsSep " " (lib.mapAttrsToList (n: v: "${n}=${v}") s.environment)}"
8988
}
9089
${lib.optionalString (s.execStop != null && !s.shutdownOnExit) "exec ${s.execStop}"}
9190
${lib.optionalString (s.execStop != null && s.shutdownOnExit) "${s.execStop}"}

modules/services/gitea.nix

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -164,32 +164,30 @@ let
164164
${targetNotFound} "$_target"
165165
fi
166166
167-
${
168-
lib.concatMapStringsSep "\n" (secret: ''
169-
local _placeholder="${secret.placeholder}"
170-
grep "@$_placeholder@" "$_target" || ${secretNotUsed} "$_target" "$_placeholder"
171-
172-
unset _secret
173-
local _secret
174-
${tagCase secret.source {
175-
file = ''
176-
if [ -f "${secret.source.file}" ] \
177-
|| ${pkgs.writeShellScript "gitea-generate-${secret.placeholder}" secret.generate} "${secret.source.file}" \
178-
; then
179-
_secret="$(cat "${secret.source.file}" | head -n 1)"
180-
else
181-
${secretNotFound} "$_target" "$_placeholder"
182-
fi
183-
'';
184-
environment = ''
185-
_secret=${secret.source.environment}
186-
_secret=''${!_secret}
187-
'';
188-
}}
189-
190-
sed -i "s,@${secret.placeholder}@,$_secret,g" "$_target"
191-
'') (lib.attrValues secrets)
192-
}
167+
${lib.concatMapStringsSep "\n" (secret: ''
168+
local _placeholder="${secret.placeholder}"
169+
grep "@$_placeholder@" "$_target" || ${secretNotUsed} "$_target" "$_placeholder"
170+
171+
unset _secret
172+
local _secret
173+
${tagCase secret.source {
174+
file = ''
175+
if [ -f "${secret.source.file}" ] \
176+
|| ${pkgs.writeShellScript "gitea-generate-${secret.placeholder}" secret.generate} "${secret.source.file}" \
177+
; then
178+
_secret="$(cat "${secret.source.file}" | head -n 1)"
179+
else
180+
${secretNotFound} "$_target" "$_placeholder"
181+
fi
182+
'';
183+
environment = ''
184+
_secret=${secret.source.environment}
185+
_secret=''${!_secret}
186+
'';
187+
}}
188+
189+
sed -i "s,@${secret.placeholder}@,$_secret,g" "$_target"
190+
'') (lib.attrValues secrets)}
193191
}
194192
'';
195193
in

modules/services/hydra.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ in
118118
# BEGIN Copyright (c) 2003-2021 Eelco Dolstra and the Nixpkgs/NixOS contributors
119119
package = lib.mkOption {
120120
type = lib.types.package;
121-
default = pkgs.hydra-unstable;
121+
default = pkgs.hydra_unstable;
122122
description = ''
123123
Which HydraCI package to use.
124124
'';

modules/services/mosquitto.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ let
5757
then
5858
"${n} ${toString (lib.elemAt v 0)}\n${lib.concatStringsSep " " (self (lib.elemAt v 1))}"
5959
else if (lib.isBool (lib.elemAt v 0)) && lib.isAttrs (lib.elemAt v 1) then
60-
"${n} ${if lib.elemAt v 0 then "true" else "false"}\n${
61-
lib.concatStringsSep " " (self (lib.elemAt v 1))
62-
}"
60+
"${n} ${
61+
if lib.elemAt v 0 then "true" else "false"
62+
}\n${lib.concatStringsSep " " (self (lib.elemAt v 1))}"
6363
else
6464
throw "Invalid subtree content"
6565
else

modules/services/mysql.nix

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -263,14 +263,12 @@ in
263263
echo "GRANT ALL PRIVILEGES ON *.* TO '${cfg.user}'@'localhost' WITH GRANT OPTION;"
264264
) | ${cfg.package}/bin/mysql -u root -N
265265
266-
${
267-
lib.optionalString (cfg.initialScript != null) ''
268-
# Execute initial script
269-
# using toString to avoid copying the file to nix store if given as path instead of string,
270-
# as it might contain credentials
271-
cat ${toString cfg.initialScript} | ${cfg.package}/bin/mysql -u root -N
272-
''
273-
}
266+
${lib.optionalString (cfg.initialScript != null) ''
267+
# Execute initial script
268+
# using toString to avoid copying the file to nix store if given as path instead of string,
269+
# as it might contain credentials
270+
cat ${toString cfg.initialScript} | ${cfg.package}/bin/mysql -u root -N
271+
''}
274272
275273
rm ${cfg.dataDir}/.first_startup
276274
fi
@@ -286,13 +284,11 @@ in
286284
( echo "CREATE USER IF NOT EXISTS '${user.name}'@'${user.address}' IDENTIFIED WITH ${
287285
if isMariaDB then "unix_socket" else "auth_socket"
288286
};"
289-
${
290-
lib.concatStringsSep "\n" (
291-
lib.mapAttrsToList (database: permission: ''
292-
echo "GRANT ${permission} ON ${database} TO '${user.name}'@'${user.address}';"
293-
'') user.ensurePermissions
294-
)
295-
}
287+
${lib.concatStringsSep "\n" (
288+
lib.mapAttrsToList (database: permission: ''
289+
echo "GRANT ${permission} ON ${database} TO '${user.name}'@'${user.address}';"
290+
'') user.ensurePermissions
291+
)}
296292
) | ${cfg.package}/bin/mysql -N -u root
297293
'') cfg.ensureUsers}
298294

modules/services/postgresql.nix

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -459,11 +459,9 @@ in
459459
)}
460460
461461
if test -e "${cfg.dataDir}/.first_startup"; then
462-
${
463-
lib.optionalString (cfg.initialScript != null) ''
464-
$PSQL -f "${cfg.initialScript}" -d postgres
465-
''
466-
}
462+
${lib.optionalString (cfg.initialScript != null) ''
463+
$PSQL -f "${cfg.initialScript}" -d postgres
464+
''}
467465
rm -f "${cfg.dataDir}/.first_startup"
468466
fi
469467

0 commit comments

Comments
 (0)