From 5970720f1cadf2d0c6ef665ad7f673c2e919bce3 Mon Sep 17 00:00:00 2001 From: Gautier DI FOLCO Date: Tue, 1 Oct 2024 22:22:20 +0200 Subject: [PATCH] nixos/minidlna: add package option --- nixos/modules/services/networking/minidlna.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/minidlna.nix b/nixos/modules/services/networking/minidlna.nix index 7f3e63dd055a..caebb3f08fc2 100644 --- a/nixos/modules/services/networking/minidlna.nix +++ b/nixos/modules/services/networking/minidlna.nix @@ -21,6 +21,8 @@ in ''; }; + options.services.minidlna.package = lib.mkPackageOption pkgs "minidlna" { }; + options.services.minidlna.openFirewall = mkOption { type = types.bool; default = false; @@ -141,7 +143,7 @@ in CacheDirectory = "minidlna"; RuntimeDirectory = "minidlna"; PIDFile = "/run/minidlna/pid"; - ExecStart = "${pkgs.minidlna}/sbin/minidlnad -S -P /run/minidlna/pid -f ${settingsFile}"; + ExecStart = "${lib.getExe cfg.package} -S -P /run/minidlna/pid -f ${settingsFile}"; }; }; };