Skip to content

Commit

Permalink
fix(config): allow nulls for database user/pass
Browse files Browse the repository at this point in the history
  • Loading branch information
anna328p committed Dec 26, 2023
1 parent 393298c commit 7dff6e3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions nix/module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ in {
client_id = mkOpt int "Discord application client ID" { };
owner = mkOpt int "Discord user ID of the bot's owner" { };

arch = {
mirror = mkOpt' str "Mirror server hosting Arch Linux repos"
"https://mirrors.edge.kernel.org/archlinux/" { };

repos = mkOpt' (listOf str) "List of repositories to index"
[ "core" "extra" "multilib" ] { };
};

database = {
type = mkOpt' (enum [ "sqlite3" "oracle_enhanced" ])
"Type of database to connect to" "sqlite3" { };
Expand Down
6 changes: 3 additions & 3 deletions share/global_config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
},

"repos": {
"description": "List of repositories to fetch",
"description": "List of repositories to index",
"type": "array",

"uniqueItems": true,
Expand Down Expand Up @@ -76,12 +76,12 @@

"user": {
"description": "Database username",
"type": "string"
"type": [ "string", "null" ]
},

"pass": {
"description": "Database password",
"type": "string"
"type": [ "string", "null" ]
}
}
},
Expand Down

0 comments on commit 7dff6e3

Please sign in to comment.