Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions nixos/modules/services/networking/networkmanager.nix
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,18 @@ in
'';
};

nbft = mkOption {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't hook up to cfg.package.

Also, you should mention that setting this option would force a rebuild of NetworkManager.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this doesn't really look fleshed out. We don't have any networkmanager support in initrd, so I'm not sure where this is going.

Also people can already override the package to enable nvme support, if it turns out to be a big closure size increase and we need to keep it opt-in.

type = lib.types.bool;
default = true; # Enable by default when libnvme is available
description = ''
Whether to enable NBFT (NVMe Boot Firmware Table) support in NetworkManager.
This allows NetworkManager to automatically configure network connections
for NVMe-over-Fabrics boot scenarios during early boot.

Only effective when NetworkManager is built with libnvme support.
'';
};

package = mkPackageOption pkgs "networkmanager" { };

connectionConfig = mkOption {
Expand Down
12 changes: 10 additions & 2 deletions pkgs/tools/networking/networkmanager/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,22 @@
systemd,
udev,
udevCheckHook,
libnvme,
withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd,
# NBFT (NVMe Boot Firmware Table) support
withNbft ? false
}:

let
pythonForDocs = python3.pythonOnBuildForHost.withPackages (pkgs: with pkgs; [ pygobject3 ]);
in
stdenv.mkDerivation (finalAttrs: {
pname = "networkmanager";
version = "1.52.1";
version = "1.54.1";

src = fetchurl {
url = "https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/releases/${finalAttrs.version}/downloads/NetworkManager-${finalAttrs.version}.tar.xz";
hash = "sha256-ixIsc0k6cvK65SfBJc69h3EWcbkDUtvisXiKupV1rG8=";
hash = "sha256-APPwvhKsTUhY6/FSQwuS3vFXSAP/YQf378dkoFbUxMc=";
};

outputs = [
Expand Down Expand Up @@ -107,6 +110,8 @@ stdenv.mkDerivation (finalAttrs: {
"-Dnmtui=true"
"-Ddnsmasq=${dnsmasq}/bin/dnsmasq"
"-Dqt=false"
# NBFT (NVMe Boot Firmware Table) support
(lib.mesonBool "nbft" withNbft)

# Handlers
"-Dresolvconf=${openresolv}/bin/resolvconf"
Expand Down Expand Up @@ -158,6 +163,9 @@ stdenv.mkDerivation (finalAttrs: {
newt
jansson
dbus # used to get directory paths with pkg-config during configuration
]
++ lib.optionals withNbft [
libnvme
];

propagatedBuildInputs = [
Expand Down
Loading