diff --git a/applications/bitwarden/_bitwarden-directory-connector.nix b/applications/bitwarden/_bitwarden-directory-connector.nix index 95fd336..ba4f44c 100644 --- a/applications/bitwarden/_bitwarden-directory-connector.nix +++ b/applications/bitwarden/_bitwarden-directory-connector.nix @@ -2,7 +2,6 @@ lib, buildNpmPackage, fetchFromGitHub, - pkgs, jq, python3, pkg-config, @@ -23,7 +22,7 @@ in }; postPatch = '' - jq 'del(.scripts.preinstall)' package.json > package.json.tmp + ${lib.getExe jq} 'del(.scripts.preinstall)' package.json > package.json.tmp mv -f package.json{.tmp,} ''; @@ -53,7 +52,6 @@ in ]; nativeBuildInputs = [ - jq python3 pkg-config ]; diff --git a/applications/bitwarden/_bitwarden_sync_module.nix b/applications/bitwarden/_bitwarden_sync_module.nix index 939e403..0d57662 100644 --- a/applications/bitwarden/_bitwarden_sync_module.nix +++ b/applications/bitwarden/_bitwarden_sync_module.nix @@ -31,7 +31,10 @@ in { }; ldap = mkOption { - description = lib.mdDoc "Options to configure the LDAP connection."; + description = lib.mdDoc '' + Options to configure the LDAP connection. + If you used the desktop application to test the configuration you can find the settings by searching for `ldap` in `~/.config/Bitwarden\ Directory\ Connector/data.json`. + ''; default = {}; type = types.submodule ({ @@ -102,7 +105,10 @@ in { }; sync = mkOption { - description = lib.mdDoc "Options to configure what gets synced."; + description = lib.mdDoc '' + Options to configure what gets synced. + If you used the desktop application to test the configuration you can find the settings by searching for `sync` in `~/.config/Bitwarden\ Directory\ Connector/data.json`. + ''; default = {}; type = types.submodule ({ @@ -253,18 +259,18 @@ in { }; systemd = { - timers.bitwarden_directory_connector = { + timers.bitwarden-directory-connector = { description = "Sync timer for Bitwarden Directory Connector"; wantedBy = ["timers.target"]; after = ["network-online.target"]; timerConfig = { OnCalendar = cfg.interval; - Unit = "bitwarden_directory_connector.service"; + Unit = "bitwarden-directory-connector.service"; Persistent = true; }; }; - services.bitwarden_directory_connector = { + services.bitwarden-directory-connector = { description = "Main process for Bitwarden Directory Connector"; path = [pkgs.jq]; @@ -277,7 +283,7 @@ in { Type = "oneshot"; User = "${cfg.user}"; PrivateTmp = true; - ExecStartPre = pkgs.writeShellScript "bitwarden_directory_connector-config" '' + preStart = '' set -eo pipefail # create the config file