0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 13:40:28 +03:00

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.
This commit is contained in:
Colin 2024-06-02 05:57:51 +00:00
parent 9d4d21b587
commit efc3208be2

View file

@ -129,7 +129,7 @@ let
packages =
[
pkgs.networkmanager
cfg.package
]
++ cfg.plugins
++ lib.optionals (!delegateWireless && !enableIwd) [
@ -161,6 +161,8 @@ in
'';
};
package = mkPackageOption pkgs "networkmanager" { };
connectionConfig = mkOption {
type =
with types;
@ -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;