nixos/modemmanager: 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-12-20 10:03:42 +00:00
parent 5a04fc7e7d
commit 9d4d21b587
@@ -1,4 +1,9 @@
{ config, lib, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.networking.modemmanager;
in
@@ -20,6 +25,8 @@ in
'';
};
package = mkPackageOption pkgs "modemmanager" { };
fccUnlockScripts = mkOption {
type = types.listOf (
types.submodule {
@@ -82,9 +89,9 @@ in
});
'';
environment.systemPackages = [ pkgs.modemmanager ];
systemd.packages = [ pkgs.modemmanager ];
services.dbus.packages = [ pkgs.modemmanager ];
services.udev.packages = [ pkgs.modemmanager ];
environment.systemPackages = [ cfg.package ];
systemd.packages = [ cfg.package ];
services.dbus.packages = [ cfg.package ];
services.udev.packages = [ cfg.package ];
};
}