Skip to content

Commit

Permalink
Merge staging-next into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Dec 19, 2024
2 parents 9e59c66 + fc37c2f commit 1c6904e
Show file tree
Hide file tree
Showing 99 changed files with 8,123 additions and 4,428 deletions.
12 changes: 12 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17079,6 +17079,12 @@
githubId = 1788628;
name = "pandaman";
};
pandanz = {
email = "[email protected]";
github = "pandanz";
githubId = 32557789;
name = "pandanz";
};
pandapip1 = {
email = "[email protected]";
github = "Pandapip1";
Expand Down Expand Up @@ -22414,6 +22420,12 @@
githubId = 3105057;
name = "Jan Beinke";
};
thelissimus = {
name = "Kei";
email = "[email protected]";
github = "thelissimus";
githubId = 70096720;
};
themaxmur = {
name = "Maxim Muravev";
email = "[email protected]";
Expand Down
2 changes: 2 additions & 0 deletions nixos/doc/manual/release-notes/rl-2505.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@

- `nodePackages.copy-webpack-plugin` has been removed, as it should be installed in projects that use it instead.

- `linuxPackages.nvidiaPackages.dc_520` has been removed since it is marked broken and there are better newer alternatives.

- `racket_7_9` has been removed, as it is insecure. It is recommended to use Racket 8 instead.

- `ente-auth` now uses the name `enteauth` for its binary. The previous name was `ente_auth`.
Expand Down
64 changes: 37 additions & 27 deletions nixos/modules/hardware/video/nvidia.nix
Original file line number Diff line number Diff line change
Expand Up @@ -92,21 +92,23 @@ in
information, see the NVIDIA docs, on Chapter 23. Dynamic Boost on Linux
'';

modesetting.enable = lib.mkEnableOption ''
kernel modesetting when using the NVIDIA proprietary driver.
Enabling this fixes screen tearing when using Optimus via PRIME (see
{option}`hardware.nvidia.prime.sync.enable`. This is not enabled
by default because it is not officially supported by NVIDIA and would not
work with SLI.
Enabling this and using version 545 or newer of the proprietary NVIDIA
driver causes it to provide its own framebuffer device, which can cause
Wayland compositors to work when they otherwise wouldn't.
'' // {
default = lib.versionAtLeast cfg.package.version "535";
defaultText = lib.literalExpression "lib.versionAtLeast cfg.package.version \"535\"";
};
modesetting.enable =
lib.mkEnableOption ''
kernel modesetting when using the NVIDIA proprietary driver.
Enabling this fixes screen tearing when using Optimus via PRIME (see
{option}`hardware.nvidia.prime.sync.enable`. This is not enabled
by default because it is not officially supported by NVIDIA and would not
work with SLI.
Enabling this and using version 545 or newer of the proprietary NVIDIA
driver causes it to provide its own framebuffer device, which can cause
Wayland compositors to work when they otherwise wouldn't.
''
// {
default = lib.versionAtLeast cfg.package.version "535";
defaultText = lib.literalExpression "lib.versionAtLeast cfg.package.version \"535\"";
};

prime.nvidiaBusId = lib.mkOption {
type = busIDType;
Expand Down Expand Up @@ -266,14 +268,16 @@ in
'';
};

gsp.enable = lib.mkEnableOption ''
the GPU System Processor (GSP) on the video card
'' // {
default = useOpenModules || lib.versionAtLeast nvidia_x11.version "555";
defaultText = lib.literalExpression ''
config.hardware.nvidia.open == true || lib.versionAtLeast config.hardware.nvidia.package.version "555"
'';
};
gsp.enable =
lib.mkEnableOption ''
the GPU System Processor (GSP) on the video card
''
// {
default = useOpenModules || lib.versionAtLeast nvidia_x11.version "555";
defaultText = lib.literalExpression ''
config.hardware.nvidia.open == true || lib.versionAtLeast config.hardware.nvidia.package.version "555"
'';
};

videoAcceleration =
(lib.mkEnableOption ''
Expand All @@ -300,7 +304,7 @@ in
message = "You cannot configure both X11 and Data Center drivers at the same time.";
}
{
assertion = cfg.open != null;
assertion = cfg.open != null || cfg.datacenter.enable;
message = ''
You must configure `hardware.nvidia.open` on NVIDIA driver versions >= 560.
It is suggested to use the open source kernel modules on Turing or later GPUs (RTX series, GTX 16xx), and the closed source modules otherwise.
Expand All @@ -323,7 +327,9 @@ in
softdep nvidia post: nvidia-uvm
'';
};
systemd.tmpfiles.rules = lib.mkIf config.virtualisation.docker.enableNvidia [ "L+ /run/nvidia-docker/bin - - - - ${nvidia_x11.bin}/origBin" ];
systemd.tmpfiles.rules = lib.mkIf config.virtualisation.docker.enableNvidia [
"L+ /run/nvidia-docker/bin - - - - ${nvidia_x11.bin}/origBin"
];
services.udev.extraRules = ''
# Create /dev/nvidia-uvm when the nvidia-uvm module is loaded.
KERNEL=="nvidia", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidiactl c 195 255'"
Expand Down Expand Up @@ -622,7 +628,9 @@ in
# If requested enable modesetting via kernel parameters.
kernelParams =
lib.optional (offloadCfg.enable || cfg.modesetting.enable) "nvidia-drm.modeset=1"
++ lib.optional ((offloadCfg.enable || cfg.modesetting.enable) && lib.versionAtLeast nvidia_x11.version "545") "nvidia-drm.fbdev=1"
++ lib.optional (
(offloadCfg.enable || cfg.modesetting.enable) && lib.versionAtLeast nvidia_x11.version "545"
) "nvidia-drm.fbdev=1"
++ lib.optional cfg.powerManagement.enable "nvidia.NVreg_PreserveVideoMemoryAllocations=1"
++ lib.optional useOpenModules "nvidia.NVreg_OpenRmEnableUnsupportedGpus=1"
++ lib.optional (config.boot.kernelPackages.kernel.kernelAtLeast "6.2" && !ibtSupport) "ibt=off";
Expand Down Expand Up @@ -683,7 +691,9 @@ in
TOPOLOGY_FILE_PATH = "${nvidia_x11.fabricmanager}/share/nvidia-fabricmanager/nvidia/nvswitch";
DATABASE_PATH = "${nvidia_x11.fabricmanager}/share/nvidia-fabricmanager/nvidia/nvswitch";
};
nv-fab-conf = settingsFormat.generate "fabricmanager.conf" (fabricManagerConfDefaults // cfg.datacenter.settings);
nv-fab-conf = settingsFormat.generate "fabricmanager.conf" (
fabricManagerConfDefaults // cfg.datacenter.settings
);
in
"${lib.getExe nvidia_x11.fabricmanager} -c ${nv-fab-conf}";
LimitCORE = "infinity";
Expand Down
2 changes: 2 additions & 0 deletions nixos/modules/services/misc/ollama.nix
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ in
# ROCm
"char-drm"
"char-kfd"
# WSL (Windows Subsystem for Linux)
"/dev/dxg"
];
DevicePolicy = "closed";
LockPersonality = true;
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/monitoring/prometheus/exporters.nix
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ let
"process"
"pve"
"py-air-control"
"rasdaemon"
"redis"
"restic"
"rspamd"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
config,
lib,
pkgs,
utils,
...
}:

let
inherit (lib)
getExe
mkOption
types
;

inherit (utils) escapeSystemdExecArgs;

cfg = config.services.prometheus.exporters.rasdaemon;
in
{
port = 10029;
extraOpts = with types; {
databasePath = mkOption {
type = path;
default = "/var/lib/rasdaemon/ras-mc_event.db";
description = ''
Path to the RAS daemon machine check event database.
'';
};

enabledCollectors = mkOption {
type = listOf (enum [
"aer"
"mce"
"mc"
"extlog"
"devlink"
"disk"
]);
default = [
"aer"
"mce"
"mc"
];
description = ''
List of error types to collect from the event database.
'';
};
};
serviceOpts = {
serviceConfig = {
ExecStart = escapeSystemdExecArgs (
[
(getExe pkgs.prometheus-rasdaemon-exporter)
"--address"
cfg.listenAddress
"--port"
(toString cfg.port)
"--db"
cfg.databasePath
]
++ map (collector: "--collector-${collector}") cfg.enabledCollectors
++ cfg.extraFlags
);
};
};
}
Loading

0 comments on commit 1c6904e

Please sign in to comment.