Skip to content

Commit 9a807b1

Browse files
Merge master into staging-next
2 parents aca1e44 + 5303bb2 commit 9a807b1

File tree

173 files changed

+2675
-1349
lines changed

Some content is hidden

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

173 files changed

+2675
-1349
lines changed

ci/OWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ nixos/modules/installer/tools/nix-fallback-paths.nix @NixOS/nix-team @raitobeza
129129
# Systemd-boot
130130
/nixos/modules/system/boot/loader/systemd-boot @JulienMalka
131131

132+
# Limine
133+
/nixos/modules/system/boot/loader/limine @lzcunt @phip1611 @programmerlexi
134+
132135
# Images and installer media
133136
/nixos/modules/profiles/installation-device.nix @ElvishJerricco
134137
/nixos/modules/installer/cd-dvd/ @ElvishJerricco

maintainers/maintainer-list.nix

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3570,6 +3570,12 @@
35703570
githubId = 32319131;
35713571
name = "Brett L";
35723572
};
3573+
bubblepipe = {
3574+
email = "[email protected]";
3575+
github = "bubblepipe";
3576+
githubId = 30717258;
3577+
name = "bubblepipe";
3578+
};
35733579
buckley310 = {
35743580
email = "[email protected]";
35753581
matrix = "@buckley310:matrix.org";
@@ -8487,12 +8493,6 @@
84878493
githubId = 34658064;
84888494
name = "Grace Dinh";
84898495
};
8490-
gebner = {
8491-
email = "[email protected]";
8492-
github = "gebner";
8493-
githubId = 313929;
8494-
name = "Gabriel Ebner";
8495-
};
84968496
geluk = {
84978497
email = "[email protected]";
84988498
github = "geluk";
@@ -19070,6 +19070,11 @@
1907019070
githubId = 74465;
1907119071
name = "James Fargher";
1907219072
};
19073+
programmerlexi = {
19074+
name = "programmerlexi";
19075+
github = "programmerlexi";
19076+
githubId = 60185691;
19077+
};
1907319078
progrm_jarvis = {
1907419079
email = "[email protected]";
1907519080
github = "JarvisCraft";

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

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

184184
- [Rebuilderd](https://github.com/kpcyrd/rebuilderd) an independent verification of binary packages - Reproducible Builds. Available as [services.rebuilderd](#opt-services.rebuilderd.enable).
185185

186+
- [Limine](https://github.com/limine-bootloader/limine) a modern, advanced, portable, multiprotocol bootloader and boot manager. Available as [boot.loader.limine](#opt-boot.loader.limine.enable)
187+
186188
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
187189

188190
## 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
@@ -1719,6 +1719,7 @@
17191719
./system/boot/loader/grub/memtest.nix
17201720
./system/boot/loader/external/external.nix
17211721
./system/boot/loader/init-script/init-script.nix
1722+
./system/boot/loader/limine/limine.nix
17221723
./system/boot/loader/loader.nix
17231724
./system/boot/loader/systemd-boot/systemd-boot.nix
17241725
./system/boot/luksroot.nix

nixos/modules/security/krb5/krb5-conf-format.nix

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,33 @@ rec {
6161
description = "Which principal the rule applies to";
6262
};
6363
access = mkOption {
64-
type = either (listOf (enum [
65-
"add"
66-
"cpw"
67-
"delete"
68-
"get"
69-
"list"
70-
"modify"
71-
])) (enum [ "all" ]);
64+
type = coercedTo str singleton (
65+
listOf (enum [
66+
"all"
67+
"add"
68+
"cpw"
69+
"delete"
70+
"get-keys"
71+
"get"
72+
"list"
73+
"modify"
74+
])
75+
);
7276
default = "all";
73-
description = "The changes the principal is allowed to make.";
77+
description = ''
78+
The changes the principal is allowed to make.
79+
80+
:::{.important}
81+
The "all" permission does not imply the "get-keys" permission. This
82+
is consistent with the behavior of both MIT Kerberos and Heimdal.
83+
:::
84+
85+
:::{.warning}
86+
Value "all" is allowed as a list member only if it appears alone
87+
or accompanied by "get-keys". Any other combination involving
88+
"all" will raise an exception.
89+
:::
90+
'';
7491
};
7592
target = mkOption {
7693
type = str;

nixos/modules/services/databases/postgresql.nix

Lines changed: 120 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ let
1414
const
1515
elem
1616
escapeShellArgs
17+
filter
1718
filterAttrs
19+
getAttr
1820
getName
21+
hasPrefix
1922
isString
2023
literalExpression
2124
mapAttrs
@@ -31,6 +34,8 @@ let
3134
mkRemovedOptionModule
3235
mkRenamedOptionModule
3336
optionalString
37+
pipe
38+
sortProperties
3439
types
3540
versionAtLeast
3641
warn
@@ -124,6 +129,100 @@ in
124129
'';
125130
};
126131

132+
systemCallFilter = mkOption {
133+
type = types.attrsOf (
134+
types.coercedTo types.bool (enable: { inherit enable; }) (
135+
types.submodule (
136+
{ name, ... }:
137+
{
138+
options = {
139+
enable = mkEnableOption "${name} in postgresql's syscall filter";
140+
priority = mkOption {
141+
default =
142+
if hasPrefix "@" name then
143+
500
144+
else if hasPrefix "~@" name then
145+
1000
146+
else
147+
1500;
148+
defaultText = literalExpression ''
149+
if hasPrefix "@" name then 500 else if hasPrefix "~@" name then 1000 else 1500
150+
'';
151+
type = types.int;
152+
description = ''
153+
Set the priority of the system call filter setting. Later declarations
154+
override earlier ones, e.g.
155+
156+
```ini
157+
[Service]
158+
SystemCallFilter=~read write
159+
SystemCallFilter=write
160+
```
161+
162+
results in a service where _only_ `read` is not allowed.
163+
164+
The ordering in the unit file is controlled by this option: the higher
165+
the number, the later it will be added to the filterset.
166+
167+
By default, depending on the prefix a priority is assigned: usually, call-groups
168+
(starting with `@`) are used to allow/deny a larger set of syscalls and later
169+
on single syscalls are configured for exceptions. Hence, syscall groups
170+
and negative groups are placed before individual syscalls by default.
171+
'';
172+
};
173+
};
174+
}
175+
)
176+
)
177+
);
178+
defaultText = literalExpression ''
179+
{
180+
"@system-service" = true;
181+
"~@privileged" = true;
182+
"~@resources" = true;
183+
}
184+
'';
185+
description = ''
186+
Configures the syscall filter for `postgresql.service`. The keys are
187+
declarations for `SystemCallFilter` as described in {manpage}`systemd.exec(5)`.
188+
189+
The value is a boolean: `true` adds the attribute name to the syscall filter-set,
190+
`false` doesn't. This is done to allow downstream configurations to turn off
191+
restrictions made here. E.g. with
192+
193+
```nix
194+
{
195+
services.postgresql.systemCallFilter."~@resources" = false;
196+
}
197+
```
198+
199+
it's possible to remove the restriction on `@resources` (keep in mind that
200+
`@system-service` implies `@resources`).
201+
202+
As described in the section for [](#opt-services.postgresql.systemCallFilter._name_.priority),
203+
the ordering matters. Hence, it's also possible to specify customizations with
204+
205+
```nix
206+
{
207+
services.postgresql.systemCallFilter = {
208+
"foobar" = { enable = true; priority = 23; };
209+
};
210+
}
211+
```
212+
213+
[](#opt-services.postgresql.systemCallFilter._name_.enable) is the flag whether
214+
or not it will be added to the `SystemCallFilter` of `postgresql.service`.
215+
216+
Settings with a higher priority are added after filter settings with a lower
217+
priority. Hence, syscall groups with a higher priority can discard declarations
218+
with a lower priority.
219+
220+
By default, syscall groups (i.e. attribute names starting with `@`) are added
221+
_before_ negated groups (i.e. `~@` as prefix) _before_ syscall names
222+
and negations.
223+
'';
224+
};
225+
127226
checkConfig = mkOption {
128227
type = types.bool;
129228
default = true;
@@ -583,6 +682,21 @@ in
583682
'')
584683
];
585684

685+
services.postgresql.systemCallFilter = mkMerge [
686+
(mapAttrs (const mkDefault) {
687+
"@system-service" = true;
688+
"~@privileged" = true;
689+
"~@resources" = true;
690+
})
691+
(mkIf (any extensionInstalled [ "plv8" ]) {
692+
"@pkey" = true;
693+
})
694+
(mkIf (any extensionInstalled [ "citus" ]) {
695+
"getpriority" = true;
696+
"setpriority" = true;
697+
})
698+
];
699+
586700
users.users.postgres = {
587701
name = "postgres";
588702
uid = config.ids.uids.postgres;
@@ -727,16 +841,12 @@ in
727841
RestrictRealtime = true;
728842
RestrictSUIDSGID = true;
729843
SystemCallArchitectures = "native";
730-
SystemCallFilter =
731-
[
732-
"@system-service"
733-
"~@privileged @resources"
734-
]
735-
++ lib.optionals (any extensionInstalled [ "plv8" ]) [ "@pkey" ]
736-
++ lib.optionals (any extensionInstalled [ "citus" ]) [
737-
"getpriority"
738-
"setpriority"
739-
];
844+
SystemCallFilter = pipe cfg.systemCallFilter [
845+
(mapAttrsToList (name: v: v // { inherit name; }))
846+
(filter (getAttr "enable"))
847+
sortProperties
848+
(map (getAttr "name"))
849+
];
740850
UMask = if groupAccessAvailable then "0027" else "0077";
741851
}
742852
(mkIf (cfg.dataDir != "/var/lib/postgresql/${cfg.package.psqlSchema}") {

nixos/modules/services/system/kerberos/default.nix

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,17 @@ in
5555
assertion = lib.length (lib.attrNames cfg.settings.realms) <= 1;
5656
message = "Only one realm per server is currently supported.";
5757
}
58+
{
59+
assertion =
60+
let
61+
inherit (builtins) attrValues elem length;
62+
realms = attrValues cfg.settings.realms;
63+
accesses = lib.concatMap (r: map (a: a.access) r.acl) realms;
64+
property = a: !elem "all" a || (length a <= 1) || (length a <= 2 && elem "get-keys" a);
65+
in
66+
builtins.all property accesses;
67+
message = "Cannot specify \"all\" in a list with additional permissions other than \"get-keys\"";
68+
}
5869
];
5970

6071
systemd.slices.system-kerberos-server = { };

nixos/modules/services/system/kerberos/mit.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ let
1919
add = "a";
2020
cpw = "c";
2121
delete = "d";
22+
get-keys = "e";
2223
get = "i";
2324
list = "l";
2425
modify = "m";
25-
all = "*";
26+
all = "x";
2627
};
2728

2829
aclConfigs = lib.pipe cfg.settings.realms [

0 commit comments

Comments
 (0)