fix: feedback from https://github.com/NixOS/nixpkgs/pull/265783
This commit is contained in:
parent
f1782633cd
commit
351f6b22da
2 changed files with 13 additions and 9 deletions
|
@ -2,7 +2,6 @@
|
||||||
lib,
|
lib,
|
||||||
buildNpmPackage,
|
buildNpmPackage,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
pkgs,
|
|
||||||
jq,
|
jq,
|
||||||
python3,
|
python3,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
|
@ -23,7 +22,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
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,}
|
mv -f package.json{.tmp,}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -53,7 +52,6 @@ in
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
jq
|
|
||||||
python3
|
python3
|
||||||
pkg-config
|
pkg-config
|
||||||
];
|
];
|
||||||
|
|
|
@ -31,7 +31,10 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
ldap = mkOption {
|
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 = {};
|
default = {};
|
||||||
|
|
||||||
type = types.submodule ({
|
type = types.submodule ({
|
||||||
|
@ -102,7 +105,10 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
sync = mkOption {
|
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 = {};
|
default = {};
|
||||||
|
|
||||||
type = types.submodule ({
|
type = types.submodule ({
|
||||||
|
@ -253,18 +259,18 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd = {
|
systemd = {
|
||||||
timers.bitwarden_directory_connector = {
|
timers.bitwarden-directory-connector = {
|
||||||
description = "Sync timer for Bitwarden Directory Connector";
|
description = "Sync timer for Bitwarden Directory Connector";
|
||||||
wantedBy = ["timers.target"];
|
wantedBy = ["timers.target"];
|
||||||
after = ["network-online.target"];
|
after = ["network-online.target"];
|
||||||
timerConfig = {
|
timerConfig = {
|
||||||
OnCalendar = cfg.interval;
|
OnCalendar = cfg.interval;
|
||||||
Unit = "bitwarden_directory_connector.service";
|
Unit = "bitwarden-directory-connector.service";
|
||||||
Persistent = true;
|
Persistent = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.bitwarden_directory_connector = {
|
services.bitwarden-directory-connector = {
|
||||||
description = "Main process for Bitwarden Directory Connector";
|
description = "Main process for Bitwarden Directory Connector";
|
||||||
path = [pkgs.jq];
|
path = [pkgs.jq];
|
||||||
|
|
||||||
|
@ -277,7 +283,7 @@ in {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
User = "${cfg.user}";
|
User = "${cfg.user}";
|
||||||
PrivateTmp = true;
|
PrivateTmp = true;
|
||||||
ExecStartPre = pkgs.writeShellScript "bitwarden_directory_connector-config" ''
|
preStart = ''
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
|
||||||
# create the config file
|
# create the config file
|
||||||
|
|
Loading…
Reference in a new issue