diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2019-08-24 21:37:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-24 21:37:42 +0200 |
commit | edcecfee0032110738005e486ff40325e5b08e9e (patch) | |
tree | 1aa312def654a9a7022548943016592b3a44fb01 /nixos | |
parent | 6d78972db93f596975ce00c9226d2ca30db0d39b (diff) | |
parent | 877dc46d24ae9c0a6cb3c63d57c7f3005f2e11fb (diff) | |
download | nixlib-edcecfee0032110738005e486ff40325e5b08e9e.tar nixlib-edcecfee0032110738005e486ff40325e5b08e9e.tar.gz nixlib-edcecfee0032110738005e486ff40325e5b08e9e.tar.bz2 nixlib-edcecfee0032110738005e486ff40325e5b08e9e.tar.lz nixlib-edcecfee0032110738005e486ff40325e5b08e9e.tar.xz nixlib-edcecfee0032110738005e486ff40325e5b08e9e.tar.zst nixlib-edcecfee0032110738005e486ff40325e5b08e9e.zip |
Merge pull request #67358 from jtojnar/ofono-progress
nixos/ofono: various improvements
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/module-list.nix | 1 | ||||
-rw-r--r-- | nixos/modules/services/networking/ofono.nix | 44 |
2 files changed, 45 insertions, 0 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 79c72fc14224..388f4788b59e 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -649,6 +649,7 @@ ./services/networking/nullidentdmod.nix ./services/networking/nylon.nix ./services/networking/ocserv.nix + ./services/networking/ofono.nix ./services/networking/oidentd.nix ./services/networking/openfire.nix ./services/networking/openntpd.nix diff --git a/nixos/modules/services/networking/ofono.nix b/nixos/modules/services/networking/ofono.nix new file mode 100644 index 000000000000..40ef9433de0f --- /dev/null +++ b/nixos/modules/services/networking/ofono.nix @@ -0,0 +1,44 @@ +# Ofono daemon. +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.services.ofono; + + plugin_path = + lib.concatMapStringsSep ":" + (plugin: "${plugin}/lib/ofono/plugins") + cfg.plugins + ; + +in + +{ + ###### interface + options = { + services.ofono = { + enable = mkEnableOption "Ofono"; + + plugins = mkOption { + type = types.listOf types.package; + default = []; + example = literalExample "[ pkgs.modem-manager-gui ]"; + description = '' + The list of plugins to install. + ''; + }; + }; + }; + + ###### implementation + config = mkIf cfg.enable { + services.dbus.packages = [ pkgs.ofono ]; + + systemd.packages = [ pkgs.ofono ]; + + systemd.services.ofono.environment.OFONO_PLUGIN_PATH = mkIf (cfg.plugins != []) plugin_path; + + }; +} |