Skip to content

Commit

Permalink
nixos/gitea: add mysql socket authentication as an option
Browse files Browse the repository at this point in the history
  • Loading branch information
aanderse committed Nov 8, 2018
1 parent 0bbb6f4 commit 3ed52c7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion nixos/modules/services/misc/gitea.nix
Expand Up @@ -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#
Expand Down Expand Up @@ -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";
Expand Down

0 comments on commit 3ed52c7

Please sign in to comment.