Loading nixos/modules/services/misc/calibre-server.nix +14 −14 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ config, lib, pkgs, utils, ... }: let Loading @@ -11,20 +12,17 @@ let documentationLink = "https://manual.calibre-ebook.com"; generatedDocumentationLink = documentationLink + "/generated/en/calibre-server.html"; execFlags = ( lib.concatStringsSep " " ( lib.mapAttrsToList (k: v: "${k} ${toString v}") ( execFlags = lib.mapAttrsToList (k: v: "--${k}=${toString v}") ( lib.filterAttrs (name: value: value != null) { "--listen-on" = cfg.host; "--port" = cfg.port; "--auth-mode" = cfg.auth.mode; "--userdb" = cfg.auth.userDb; listen-on = cfg.host; port = cfg.port; auth-mode = cfg.auth.mode; userdb = cfg.auth.userDb; } ) ++ [ (lib.optionalString (cfg.auth.enable == true) "--enable-auth") ] ++ cfg.extraFlags ) ); ++ lib.optional cfg.auth.enable "--enable-auth" ++ cfg.extraFlags; in { Loading Loading @@ -150,7 +148,9 @@ in serviceConfig = { User = cfg.user; Restart = "always"; ExecStart = "${cfg.package}/bin/calibre-server ${lib.concatStringsSep " " cfg.libraries} ${execFlags}"; ExecStart = utils.escapeSystemdExecArgs ( [ "${cfg.package}/bin/calibre-server" ] ++ execFlags ++ [ "--" ] ++ cfg.libraries ); }; }; Loading Loading
nixos/modules/services/misc/calibre-server.nix +14 −14 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ config, lib, pkgs, utils, ... }: let Loading @@ -11,20 +12,17 @@ let documentationLink = "https://manual.calibre-ebook.com"; generatedDocumentationLink = documentationLink + "/generated/en/calibre-server.html"; execFlags = ( lib.concatStringsSep " " ( lib.mapAttrsToList (k: v: "${k} ${toString v}") ( execFlags = lib.mapAttrsToList (k: v: "--${k}=${toString v}") ( lib.filterAttrs (name: value: value != null) { "--listen-on" = cfg.host; "--port" = cfg.port; "--auth-mode" = cfg.auth.mode; "--userdb" = cfg.auth.userDb; listen-on = cfg.host; port = cfg.port; auth-mode = cfg.auth.mode; userdb = cfg.auth.userDb; } ) ++ [ (lib.optionalString (cfg.auth.enable == true) "--enable-auth") ] ++ cfg.extraFlags ) ); ++ lib.optional cfg.auth.enable "--enable-auth" ++ cfg.extraFlags; in { Loading Loading @@ -150,7 +148,9 @@ in serviceConfig = { User = cfg.user; Restart = "always"; ExecStart = "${cfg.package}/bin/calibre-server ${lib.concatStringsSep " " cfg.libraries} ${execFlags}"; ExecStart = utils.escapeSystemdExecArgs ( [ "${cfg.package}/bin/calibre-server" ] ++ execFlags ++ [ "--" ] ++ cfg.libraries ); }; }; Loading