nixos/bookstack: Updated to accommodate passwordless login for mysql
This commit is contained in:
@@ -16,9 +16,13 @@ let
|
|||||||
|
|
||||||
artisan = "${cfg.package}/artisan";
|
artisan = "${cfg.package}/artisan";
|
||||||
|
|
||||||
env-file-values = lib.attrsets.mapAttrs' (
|
env-file-values =
|
||||||
n: v: lib.attrsets.nameValuePair (lib.strings.removeSuffix "_FILE" n) v
|
lib.attrsets.mapAttrs' (n: v: lib.attrsets.nameValuePair (lib.strings.removeSuffix "_FILE" n) v)
|
||||||
) (lib.attrsets.filterAttrs (n: v: lib.strings.hasSuffix "_FILE" n) cfg.settings);
|
(
|
||||||
|
lib.attrsets.filterAttrs (n: v: !builtins.isNull v) (
|
||||||
|
lib.attrsets.filterAttrs (n: v: lib.strings.hasSuffix "_FILE" n) cfg.settings
|
||||||
|
)
|
||||||
|
);
|
||||||
env-nonfile-values = lib.attrsets.filterAttrs (n: v: !lib.strings.hasSuffix "_FILE" n) cfg.settings;
|
env-nonfile-values = lib.attrsets.filterAttrs (n: v: !lib.strings.hasSuffix "_FILE" n) cfg.settings;
|
||||||
|
|
||||||
bookstack-maintenance = pkgs.writeShellScript "bookstack-maintenance.sh" ''
|
bookstack-maintenance = pkgs.writeShellScript "bookstack-maintenance.sh" ''
|
||||||
@@ -132,12 +136,15 @@ in
|
|||||||
"database"
|
"database"
|
||||||
"user"
|
"user"
|
||||||
] "Use services.bookstack.settings.DB_USERNAME instead.")
|
] "Use services.bookstack.settings.DB_USERNAME instead.")
|
||||||
(lib.mkRemovedOptionModule [
|
(lib.mkRemovedOptionModule
|
||||||
"services"
|
[
|
||||||
"bookstack"
|
"services"
|
||||||
"database"
|
"bookstack"
|
||||||
"createLocally"
|
"database"
|
||||||
] "This option is deprecated. Please create your database manually.")
|
"createLocally"
|
||||||
|
]
|
||||||
|
"This option is deprecated. Please create your database manually or use services.mysql.ensureDatabases and services.mysql.ensureUsers."
|
||||||
|
)
|
||||||
(lib.mkRemovedOptionModule [
|
(lib.mkRemovedOptionModule [
|
||||||
"services"
|
"services"
|
||||||
"bookstack"
|
"bookstack"
|
||||||
@@ -281,11 +288,12 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
DB_PASSWORD_FILE = lib.mkOption {
|
DB_PASSWORD_FILE = lib.mkOption {
|
||||||
type = lib.types.path;
|
type = lib.types.nullOr lib.types.path;
|
||||||
description = ''
|
description = ''
|
||||||
The file containing your mysql/mariadb database password.
|
The file containing your mysql/mariadb database password.
|
||||||
'';
|
'';
|
||||||
example = "/var/secrets/bookstack-mysql-pass.txt";
|
example = "/var/secrets/bookstack-mysql-pass.txt";
|
||||||
|
default = null;
|
||||||
};
|
};
|
||||||
APP_KEY_FILE = lib.mkOption {
|
APP_KEY_FILE = lib.mkOption {
|
||||||
type = lib.types.path;
|
type = lib.types.path;
|
||||||
|
|||||||
Reference in New Issue
Block a user