mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-20 12:42:24 +00:00
nixos/gitea: add mysql socket authentication as an option
This commit is contained in:
parent
0bbb6f4f2a
commit
3ed52c7804
|
@ -15,7 +15,7 @@ let
|
|||
|
||||
[database]
|
||||
DB_TYPE = ${cfg.database.type}
|
||||
HOST = ${cfg.database.host}:${toString cfg.database.port}
|
||||
HOST = ${if cfg.database.socket != null then cfg.database.socket else cfg.database.host + ":" + toString cfg.database.port}
|
||||
NAME = ${cfg.database.name}
|
||||
USER = ${cfg.database.user}
|
||||
PASSWD = #dbpass#
|
||||
|
@ -149,6 +149,13 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
socket = mkOption {
|
||||
type = types.nullOr types.path;
|
||||
default = null;
|
||||
example = "/run/mysqld/mysqld.sock";
|
||||
description = "Path to the unix socket file to use for authentication.";
|
||||
};
|
||||
|
||||
path = mkOption {
|
||||
type = types.str;
|
||||
default = "${cfg.stateDir}/data/gitea.db";
|
||||
|
|
Loading…
Reference in a new issue