1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-06 17:11:03 +01:00

lazysql: add module (#7231)

This commit is contained in:
Aguirre Matteo 2025-06-08 04:51:28 +00:00 committed by GitHub
parent 980aece33a
commit bd8946c773
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 101 additions and 0 deletions

View file

@ -0,0 +1 @@
{ lazysql-example-config = ./example-config.nix; }

View file

@ -0,0 +1,38 @@
{
programs.lazysql = {
enable = true;
settings = {
database = [
{
Name = "Production database";
Provider = "postgres";
DBName = "foo";
URL = "postgres://postgres:urlencodedpassword@localhost:$${port}/foo";
Commands = [
{
Command = "ssh -tt remote-bastion -L $${port}:localhost:5432";
WaitForPort = "$${port}";
}
];
}
{
Name = "Development database";
Provider = "postgres";
DBName = "foo";
URL = "postgres://postgres:urlencodedpassword@localhost:5432/foo";
}
];
application = {
DefaultPageSize = 300;
DisableSidebar = false;
SidebarOverlay = false;
};
};
};
nmt.script = ''
assertFileExists home-files/.config/lazysql/config.toml
assertFileContent home-files/.config/lazysql/config.toml \
${./example-config.toml}
'';
}

View file

@ -0,0 +1,19 @@
[application]
DefaultPageSize = 300
DisableSidebar = false
SidebarOverlay = false
[[database]]
DBName = "foo"
Name = "Production database"
Provider = "postgres"
URL = "postgres://postgres:urlencodedpassword@localhost:$${port}/foo"
[[database.Commands]]
Command = "ssh -tt remote-bastion -L $${port}:localhost:5432"
WaitForPort = "$${port}"
[[database]]
DBName = "foo"
Name = "Development database"
Provider = "postgres"
URL = "postgres://postgres:urlencodedpassword@localhost:5432/foo"