Skip to content

Commit 1127aae

Browse files
Merge master into staging-next
2 parents 2272ff1 + 4196573 commit 1127aae

113 files changed

Lines changed: 992 additions & 759 deletions

File tree

Some content is hidden

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

maintainers/maintainer-list.nix

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1903,6 +1903,12 @@
19031903
matrix = "@schuelermine:matrix.org";
19041904
keys = [ { fingerprint = "CDBF ECA8 36FE E340 1CEB 58FF BA34 EE1A BA3A 0955"; } ];
19051905
}; # currently on hiatus, please do not ping until this notice is removed (or if it’s been like two years)
1906+
anstylian = {
1907+
email = "agathangelos.stylianidis@gmail.com";
1908+
github = "anstylian";
1909+
githubId = 11269403;
1910+
name = "Angelos Stylinidis";
1911+
};
19061912
anthonyroussel = {
19071913
email = "anthony@roussel.dev";
19081914
github = "anthonyroussel";
@@ -10815,7 +10821,7 @@
1081510821
};
1081610822
husjon = {
1081710823
name = "Jon Erling Hustadnes";
10818-
email = "jonerling.hustadnes+nixpkgs@gmail.com";
10824+
email = "jonerling.hustadnes+nixpkgs@proton.me";
1081910825
github = "husjon";
1082010826
githubId = 554229;
1082110827
};
@@ -14534,6 +14540,12 @@
1453414540
github = "juuyokka";
1453514541
githubId = 15185244;
1453614542
};
14543+
Ladas552 = {
14544+
email = "l.tokshalov@gmail.com";
14545+
github = "Ladas552";
14546+
githubId = 94762349;
14547+
name = "Ladas552";
14548+
};
1453714549
lafrenierejm = {
1453814550
email = "joseph@lafreniere.xyz";
1453914551
github = "lafrenierejm";

nixos/doc/manual/redirects.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,18 @@
7676
"module-services-tandoor-recipes-migrating-media-option-disallow-access": [
7777
"index.html#module-services-tandoor-recipes-migrating-media-option-disallow-access"
7878
],
79+
"module-virtualisation-xen": [
80+
"index.html#module-virtualisation-xen"
81+
],
82+
"module-virtualisation-xen-installation-dom0": [
83+
"index.html#module-virtualisation-xen-installation-dom0"
84+
],
85+
"module-virtualisation-xen-installation-domU": [
86+
"index.html#module-virtualisation-xen-installation-domU"
87+
],
88+
"module-virtualisation-xen-introduction": [
89+
"index.html#module-virtualisation-xen-introduction"
90+
],
7991
"sec-override-nixos-test": [
8092
"index.html#sec-override-nixos-test"
8193
],

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ See <https://github.com/NixOS/nixpkgs/issues/481673>.
133133

134134
- Cinnamon has been updated to 6.6, please check the [upstream announcement](https://www.linuxmint.com/rel_zena_whatsnew.php) for more details.
135135

136+
- Budgie has been updated to 10.10, please check the [upstream announcement](https://buddiesofbudgie.org/blog/budgie-10-10-released) for more details.
137+
136138
- `services.frp` now supports multiple instances through `services.frp.instances` to make it possible to run multiple frp clients or servers at the same time.
137139

138140
- `hyphen` now supports over 40 language variants through `hyphenDicts` and now allows to enable all supported languages through `hyphenDicts.all`.

nixos/modules/services/desktop-managers/budgie.nix

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -156,15 +156,19 @@ in
156156
fi
157157
'';
158158

159+
# https://docs.buddiesofbudgie.org/10.10/developer/workflow/building-budgie-desktop/#compositor-recommendations
160+
programs.labwc.enable = mkDefault true;
161+
programs.gtklock.enable = mkDefault true;
162+
159163
environment.systemPackages =
160164
with pkgs;
161165
[
162166
# Budgie Desktop.
163167
budgie-backgrounds
164168
budgie-control-center'
169+
budgie-desktop-services
165170
(budgie-desktop-with-plugins.override { plugins = cfg.extraPlugins; })
166171
budgie-desktop-view
167-
budgie-screensaver
168172
budgie-session
169173

170174
# Required by Budgie Menu.
@@ -190,6 +194,17 @@ in
190194
mate.mate-system-monitor
191195
vlc
192196

197+
# Supplemental tooling.
198+
# See budgie-desktop's with-runtime-dependencies meson option.
199+
gammastep
200+
grim
201+
killall
202+
slurp
203+
swaybg
204+
swayidle
205+
wdisplays
206+
wlopm
207+
193208
# Desktop themes.
194209
qogir-theme
195210
qogir-icon-theme
@@ -224,9 +239,6 @@ in
224239
services.xserver.updateDbusEnvironment = true;
225240
programs.dconf.enable = true;
226241

227-
# Required by Budgie Screensaver.
228-
security.pam.services.budgie-screensaver = { };
229-
230242
# Required by Budgie's Polkit Dialog.
231243
security.polkit.enable = mkDefault true;
232244

@@ -240,6 +252,7 @@ in
240252
xdg.portal.enable = mkDefault true; # for BCC's Applications panel.
241253
xdg.portal.extraPortals = with pkgs; [
242254
xdg-desktop-portal-gtk # provides a XDG Portals implementation.
255+
xdg-desktop-portal-wlr # for screenshot and screencast.
243256
];
244257
xdg.portal.configPackages = mkDefault [ pkgs.budgie-desktop ];
245258

@@ -274,11 +287,7 @@ in
274287
# Register packages for DBus.
275288
services.dbus.packages = [
276289
budgie-control-center'
277-
];
278-
279-
# Register packages for udev.
280-
services.udev.packages = with pkgs; [
281-
magpie
290+
pkgs.budgie-desktop-services
282291
];
283292

284293
# Shell integration for MATE Terminal.

nixos/modules/services/networking/sabnzbd/default.nix

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ let
1313
mkOptionDefault
1414
mkIf
1515
literalExpression
16-
optionalString
1716
types
1817
;
1918
inherit (lib.generators)
@@ -79,7 +78,6 @@ let
7978
mkSection = (
8079
depth: attrs:
8180
let
82-
atoms = extractAtoms attrs;
8381
sections = extractSections attrs;
8482
sectionHeadingLeft = lib.concatStrings (lib.replicate (depth + 1) "[");
8583
sectionHeadingRight = lib.concatStrings (lib.replicate (depth + 1) "]");
@@ -103,7 +101,8 @@ let
103101
else
104102
(configObjIni { }).generate "public-settings.ini" allSettings;
105103

106-
sabnzbdIniPath = "/var/lib/${cfg.stateDir}/sabnzbd.ini";
104+
sabnzbdIniPath =
105+
if cfg.configFile != null then cfg.configFile else "/var/lib/${cfg.stateDir}/sabnzbd.ini";
107106
in
108107

109108
{
@@ -115,8 +114,12 @@ in
115114

116115
configFile = mkOption {
117116
type = types.nullOr types.path;
118-
default = null;
119-
description = "Path to config file (deprecated, use `settings` instead)";
117+
default =
118+
if lib.versionOlder config.system.stateVersion "26.05" then
119+
"/var/lib/sabnzbd/sabnzbd.ini"
120+
else
121+
null;
122+
description = "Path to config file (deprecated, use `settings` instead and set this value to null)";
120123
};
121124

122125
stateDir = mkOption {
@@ -511,7 +514,10 @@ in
511514
systemd.services.sabnzbd =
512515
let
513516
files =
514-
(lib.optional cfg.allowConfigWrite sabnzbdIniPath) ++ [ publicSettingsIni ] ++ cfg.secretFiles;
517+
if cfg.configFile != null then
518+
[ sabnzbdIniPath ]
519+
else
520+
(lib.optional cfg.allowConfigWrite sabnzbdIniPath) ++ [ publicSettingsIni ] ++ cfg.secretFiles;
515521
iniPathQuoted = lib.escapeShellArg sabnzbdIniPath;
516522
in
517523
{
@@ -531,11 +537,20 @@ in
531537
532538
${lib.toShellVar "files" files}
533539
540+
tmpfile=$(mktemp)
541+
534542
${lib.getExe (pkgs.python3.withPackages (py: [ py.configobj ]))} \
535543
${./config_merge.py} \
536-
"''${files[@]}" | \
537-
install -D -m ${if cfg.allowConfigWrite then "600" else "400"} \
538-
-o '${cfg.user}' -g '${cfg.group}' /dev/stdin ${iniPathQuoted}
544+
"''${files[@]}" \
545+
> "$tmpfile"
546+
547+
install -D \
548+
-m ${if cfg.allowConfigWrite then "600" else "400"} \
549+
-o '${cfg.user}' -g '${cfg.group}' \
550+
"$tmpfile" \
551+
${iniPathQuoted}
552+
553+
rm "$tmpfile"
539554
'';
540555
};
541556

nixos/modules/services/system/userborn.nix

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ let
3838
userbornStaticFiles =
3939
pkgs.runCommand "static-userborn" { }
4040
"mkdir -p $out; ${lib.getExe cfg.package} ${userbornConfigJson} $out";
41+
previousConfigPath = "/var/lib/userborn/previous-userborn.json";
4142

4243
immutableEtc = config.system.etc.overlay.enable && !config.system.etc.overlay.mutable;
4344
# The filenames created by userborn.
@@ -155,6 +156,10 @@ in
155156
# This way we don't have to re-declare all the dependencies to other
156157
# services again.
157158
aliases = [ "systemd-sysusers.service" ];
159+
environment = {
160+
USERBORN_MUTABLE_USERS = lib.boolToString userCfg.mutableUsers;
161+
USERBORN_PREVIOUS_CONFIG = lib.mkIf userCfg.mutableUsers previousConfigPath;
162+
};
158163

159164
unitConfig = {
160165
Description = "Manage Users and Groups";
@@ -165,6 +170,7 @@ in
165170
Type = "oneshot";
166171
RemainAfterExit = true;
167172
TimeoutSec = "90s";
173+
StateDirectory = "userborn";
168174

169175
ExecStart = "${lib.getExe cfg.package} ${userbornConfigJson} ${cfg.passwordFilesLocation}";
170176

@@ -179,13 +185,18 @@ in
179185
))
180186
];
181187

182-
# Make the source files read-only after userborn has finished.
183-
ExecStartPost = lib.mkIf (!userCfg.mutableUsers) (
184-
lib.map (
185-
file:
186-
"${pkgs.util-linux}/bin/mount --bind -o ro ${cfg.passwordFilesLocation}/${file} ${cfg.passwordFilesLocation}/${file}"
187-
) passwordFiles
188-
);
188+
ExecStartPost =
189+
if userCfg.mutableUsers then
190+
# Store the config somewhere for the next invocation
191+
[
192+
"${pkgs.coreutils}/bin/ln -sf ${userbornConfigJson} ${previousConfigPath}"
193+
]
194+
else
195+
# Make the source files read-only after userborn has finished.
196+
(lib.map (
197+
file:
198+
"${pkgs.util-linux}/bin/mount --bind -o ro ${cfg.passwordFilesLocation}/${file} ${cfg.passwordFilesLocation}/${file}"
199+
) passwordFiles);
189200
};
190201
};
191202
};

nixos/modules/virtualisation/xen-dom0.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -935,5 +935,8 @@ in
935935
};
936936
};
937937
};
938-
meta.maintainers = teams.xen.members;
938+
meta = {
939+
doc = ./xen.md;
940+
maintainers = teams.xen.members;
941+
};
939942
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Xen Project Hypervisor {#module-virtualisation-xen}
2+
3+
## Introduction {#module-virtualisation-xen-introduction}
4+
5+
The [**Xen Project Hypervisor**](https://xenproject.org/) is an open-source
6+
type-1 virtual machine manager which allows multiple virtual machines, known as
7+
*domains*, to run concurrently with the host on the physical machine. This is
8+
unlike a typical type-2 hypervisor, such as QEMU, where the virtual machines run
9+
as applications on top of the host. NixOS runs as the privileged *Domain 0*, and
10+
can paravirtualise (PV Mode) or fully virtualise (HVM Mode) unprivileged domains
11+
(`domUs`).
12+
13+
Xen is security-supported in NixOS. All
14+
[Xen Security Advisories](https://xenbits.xenproject.org/xsa) are patched within
15+
hours of release, and generally reach the binary cache channels within a couple
16+
of days.
17+
18+
## Domain 0 Installation {#module-virtualisation-xen-installation-dom0}
19+
20+
Xen may be used as a Domain 0 since
21+
[NixOS 24.11](#sec-release-24.11-highlights), using the
22+
{option}`virtualisation.xen.enable` option. There are various hardware and
23+
software requirements to running a Xen Domain 0; the module is configured to
24+
prevent running Xen on a NixOS system that does not meet the software
25+
requirements. (i.e. a NixOS system that uses the legacy, scripted initial
26+
ramdisk.) The module does not yet check if the hardware requirements are met:
27+
please manually ensure that the target machine supports
28+
[SLAT](Second_Level_Address_Translation) and
29+
[IOMMU](https://en.wikipedia.org/wiki/Input%E2%80%93output_memory_management_unit),
30+
the latter being required only for non-PV domains to be virtualised.
31+
32+
The boot menu on a Xen-enabled NixOS system will show duplicate entries for each
33+
generation: one boots a normal NixOS system, and the other boots into the Xen
34+
Project Hypervisor. The [`systemd-boot`](#opt-boot.loader.systemd-boot.enable)
35+
and [Limine](#opt-boot.loader.limine.enable) bootloaders are the only supported
36+
boot methods at this time.
37+
38+
Xen may be managed through various frontend configuration systems. `libxenlight`
39+
is one such configuration system, and is built into all Xen systems. The `xl`
40+
command is the primary command-line interface to `libxenlight`, and is capable
41+
of managing a NixOS Domain 0.
42+
43+
## Unprivileged Domain Installation {#module-virtualisation-xen-installation-domU}
44+
45+
Known generically as guests, unprivileged domains running NixOS may import the
46+
[`xen-domU.nix`](https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/virtualisation/xen-domU.nix)
47+
profile in their configurations to automatically enable various recommended
48+
optimisations which are relevant for unprivileged domains.
49+
50+
:::{.example}
51+
52+
# Import the Xen Unprivileged Domain profile into a NixOS configuration
53+
54+
```nix
55+
{
56+
imports = [
57+
<nixpkgs/nixos/modules/virtualisation/xen-domU.nix>
58+
];
59+
}
60+
```
61+
62+
:::

0 commit comments

Comments
 (0)