diff options
author | datafoo <34766150+datafoo@users.noreply.github.com> | 2022-01-19 15:57:04 +0100 |
---|---|---|
committer | datafoo <34766150+datafoo@users.noreply.github.com> | 2022-01-19 15:59:53 +0100 |
commit | 1d3f0903a8b4062f9207c5561b236bbc3f1ebf82 (patch) | |
tree | 9189c007b593f2905f3b2f90ddf70a3846b6bc78 /nixos | |
parent | eefa3b6f9e244bda6de147ce6f61afd8e802a742 (diff) | |
download | nixlib-1d3f0903a8b4062f9207c5561b236bbc3f1ebf82.tar nixlib-1d3f0903a8b4062f9207c5561b236bbc3f1ebf82.tar.gz nixlib-1d3f0903a8b4062f9207c5561b236bbc3f1ebf82.tar.bz2 nixlib-1d3f0903a8b4062f9207c5561b236bbc3f1ebf82.tar.lz nixlib-1d3f0903a8b4062f9207c5561b236bbc3f1ebf82.tar.xz nixlib-1d3f0903a8b4062f9207c5561b236bbc3f1ebf82.tar.zst nixlib-1d3f0903a8b4062f9207c5561b236bbc3f1ebf82.zip |
nixos/mosquitto: add package option
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/networking/mosquitto.nix | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/nixos/modules/services/networking/mosquitto.nix b/nixos/modules/services/networking/mosquitto.nix index 85d3ea5bd751..b41a2fd27be2 100644 --- a/nixos/modules/services/networking/mosquitto.nix +++ b/nixos/modules/services/networking/mosquitto.nix @@ -136,7 +136,7 @@ let + concatStringsSep "\n" (plainLines ++ optional (plainLines != []) '' - ${pkgs.mosquitto}/bin/mosquitto_passwd -U "$file" + ${cfg.package}/bin/mosquitto_passwd -U "$file" '' ++ hashedLines)); @@ -444,6 +444,15 @@ let globalOptions = with types; { enable = mkEnableOption "the MQTT Mosquitto broker"; + package = mkOption { + type = package; + default = pkgs.mosquitto; + defaultText = literalExpression "pkgs.mosquitto"; + description = '' + Mosquitto package to use. + ''; + }; + bridges = mkOption { type = attrsOf bridgeOptions; default = {}; @@ -565,7 +574,7 @@ in RuntimeDirectory = "mosquitto"; WorkingDirectory = cfg.dataDir; Restart = "on-failure"; - ExecStart = "${pkgs.mosquitto}/bin/mosquitto -c ${configFile}"; + ExecStart = "${cfg.package}/bin/mosquitto -c ${configFile}"; ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; # Hardening |