nixos/services.manticore: remove with lib;
This commit is contained in:
@@ -4,9 +4,6 @@
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.services.manticore;
|
||||
@@ -14,7 +11,7 @@ let
|
||||
|
||||
toSphinx =
|
||||
{
|
||||
mkKeyValue ? generators.mkKeyValueDefault { } "=",
|
||||
mkKeyValue ? lib.generators.mkKeyValueDefault { } "=",
|
||||
listsAsDuplicateKeys ? true,
|
||||
}:
|
||||
attrsOfAttrs:
|
||||
@@ -22,7 +19,7 @@ let
|
||||
# map function to string for each key val
|
||||
mapAttrsToStringsSep =
|
||||
sep: mapFn: attrs:
|
||||
concatStringsSep sep (mapAttrsToList mapFn attrs);
|
||||
lib.concatStringsSep sep (lib.mapAttrsToList mapFn attrs);
|
||||
mkSection =
|
||||
sectName: sectValues:
|
||||
''
|
||||
@@ -46,9 +43,9 @@ in
|
||||
options = {
|
||||
services.manticore = {
|
||||
|
||||
enable = mkEnableOption "Manticoresearch";
|
||||
enable = lib.mkEnableOption "Manticoresearch";
|
||||
|
||||
settings = mkOption {
|
||||
settings = lib.mkOption {
|
||||
default = {
|
||||
searchd = {
|
||||
listen = [
|
||||
@@ -67,10 +64,10 @@ in
|
||||
<https://manual.manticoresearch.com/Server%20settings>
|
||||
for more information.
|
||||
'';
|
||||
type = types.submodule {
|
||||
type = lib.types.submodule {
|
||||
freeformType = format.type;
|
||||
};
|
||||
example = literalExpression ''
|
||||
example = lib.literalExpression ''
|
||||
{
|
||||
searchd = {
|
||||
listen = [
|
||||
@@ -90,7 +87,7 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
systemd = {
|
||||
packages = [ pkgs.manticoresearch ];
|
||||
|
||||
Reference in New Issue
Block a user