Skip to content

Commit efc3208

Browse files
committed
nixos/networkmanager: add a package option
this is helpful for testing module changes or making downstream patches in a way which doesn't force large rebuilds as an overlay would.
1 parent 9d4d21b commit efc3208

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

nixos/modules/services/networking/networkmanager.nix

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ let
129129

130130
packages =
131131
[
132-
pkgs.networkmanager
132+
cfg.package
133133
]
134134
++ cfg.plugins
135135
++ lib.optionals (!delegateWireless && !enableIwd) [
@@ -161,6 +161,8 @@ in
161161
'';
162162
};
163163

164+
package = mkPackageOption pkgs "networkmanager" { };
165+
164166
connectionConfig = mkOption {
165167
type =
166168
with types;
@@ -643,7 +645,7 @@ in
643645
${pkgs.envsubst}/bin/envsubst -i ${ini.generate (lib.escapeShellArg profile.n) profile.v} > ${path (lib.escapeShellArg profile.n)}
644646
'') (lib.mapAttrsToList (n: v: { inherit n v; }) cfg.ensureProfiles.profiles)
645647
+ ''
646-
${pkgs.networkmanager}/bin/nmcli connection reload
648+
${cfg.package}/bin/nmcli connection reload
647649
'';
648650
serviceConfig = {
649651
EnvironmentFile = cfg.ensureProfiles.environmentFiles;

0 commit comments

Comments
 (0)