nixos/dolibarr: add package option
Allow users to easily use a different dolibarr version, e.g. version 18 (currently in unstable) instead of 16.
This commit is contained in:
parent
9f689d42a7
commit
7a363cef5f
1 changed files with 4 additions and 2 deletions
|
@ -1,8 +1,8 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
inherit (lib) any boolToString concatStringsSep isBool isString mapAttrsToList mkDefault mkEnableOption mkIf mkMerge mkOption optionalAttrs types;
|
||||
inherit (lib) any boolToString concatStringsSep isBool isString mapAttrsToList mkDefault mkEnableOption mkIf mkMerge mkOption optionalAttrs types mkPackageOptionMD;
|
||||
|
||||
package = pkgs.dolibarr.override { inherit (cfg) stateDir; };
|
||||
package = cfg.package.override { inherit (cfg) stateDir; };
|
||||
|
||||
cfg = config.services.dolibarr;
|
||||
vhostCfg = lib.optionalAttrs (cfg.nginx != null) config.services.nginx.virtualHosts."${cfg.domain}";
|
||||
|
@ -50,6 +50,8 @@ in
|
|||
options.services.dolibarr = {
|
||||
enable = mkEnableOption (lib.mdDoc "dolibarr");
|
||||
|
||||
package = mkPackageOptionMD pkgs "dolibarr" { };
|
||||
|
||||
domain = mkOption {
|
||||
type = types.str;
|
||||
default = "localhost";
|
||||
|
|
Loading…
Reference in a new issue