Skip to content

Commit

Permalink
nixos/networkmanager: add a package option
Browse files Browse the repository at this point in the history
this is helpful for testing module changes or making downstream patches
in a way which doesn't force large rebuilds as an overlay would.
  • Loading branch information
uninsane committed Dec 20, 2024
1 parent 9d4d21b commit efc3208
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nixos/modules/services/networking/networkmanager.nix
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ let

packages =
[
pkgs.networkmanager
cfg.package
]
++ cfg.plugins
++ lib.optionals (!delegateWireless && !enableIwd) [
Expand Down Expand Up @@ -161,6 +161,8 @@ in
'';
};

package = mkPackageOption pkgs "networkmanager" { };

connectionConfig = mkOption {
type =
with types;
Expand Down Expand Up @@ -643,7 +645,7 @@ in
${pkgs.envsubst}/bin/envsubst -i ${ini.generate (lib.escapeShellArg profile.n) profile.v} > ${path (lib.escapeShellArg profile.n)}
'') (lib.mapAttrsToList (n: v: { inherit n v; }) cfg.ensureProfiles.profiles)
+ ''
${pkgs.networkmanager}/bin/nmcli connection reload
${cfg.package}/bin/nmcli connection reload
'';
serviceConfig = {
EnvironmentFile = cfg.ensureProfiles.environmentFiles;
Expand Down

0 comments on commit efc3208

Please sign in to comment.