sqls: add module
sqls is a SQL language server written in Go. See: https://github.com/lighttiger2505/sqls
This commit is contained in:
parent
c7592b747b
commit
fa73c3167e
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
|
@ -203,6 +203,8 @@
|
||||||
/modules/programs/sm64ex.nix @ivarwithoutbones
|
/modules/programs/sm64ex.nix @ivarwithoutbones
|
||||||
/tests/modules/programs/sm64ex @ivarwithoutbones
|
/tests/modules/programs/sm64ex @ivarwithoutbones
|
||||||
|
|
||||||
|
/modules/programs/sqls.nix @marsam
|
||||||
|
|
||||||
/modules/programs/ssh.nix @rycee
|
/modules/programs/ssh.nix @rycee
|
||||||
|
|
||||||
/modules/programs/starship.nix @marsam
|
/modules/programs/starship.nix @marsam
|
||||||
|
|
|
@ -2290,6 +2290,13 @@ in
|
||||||
starting from v596.
|
starting from v596.
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
time = "2021-12-10T23:19:57+00:00";
|
||||||
|
message = ''
|
||||||
|
A new module is available: 'programs.sqls'.
|
||||||
|
'';
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,6 +132,7 @@ let
|
||||||
./programs/senpai.nix
|
./programs/senpai.nix
|
||||||
./programs/skim.nix
|
./programs/skim.nix
|
||||||
./programs/sm64ex.nix
|
./programs/sm64ex.nix
|
||||||
|
./programs/sqls.nix
|
||||||
./programs/ssh.nix
|
./programs/ssh.nix
|
||||||
./programs/starship.nix
|
./programs/starship.nix
|
||||||
./programs/taskwarrior.nix
|
./programs/taskwarrior.nix
|
||||||
|
|
47
modules/programs/sqls.nix
Normal file
47
modules/programs/sqls.nix
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
cfg = config.programs.sqls;
|
||||||
|
|
||||||
|
yamlFormat = pkgs.formats.yaml { };
|
||||||
|
|
||||||
|
in {
|
||||||
|
meta.maintainers = [ maintainers.marsam ];
|
||||||
|
|
||||||
|
options.programs.sqls = {
|
||||||
|
enable = mkEnableOption "sqls, a SQL language server written in Go";
|
||||||
|
|
||||||
|
settings = mkOption {
|
||||||
|
type = yamlFormat.type;
|
||||||
|
default = { };
|
||||||
|
example = literalExpression ''
|
||||||
|
{
|
||||||
|
lowercaseKeywords = true;
|
||||||
|
connections = [
|
||||||
|
{
|
||||||
|
driver = "mysql";
|
||||||
|
dataSourceName = "root:root@tcp(127.0.0.1:13306)/world";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
description = ''
|
||||||
|
Configuration written to
|
||||||
|
<filename>$XDG_CONFIG_HOME/sqls/config.yml</filename>. See
|
||||||
|
<link xlink:href="https://github.com/lighttiger2505/sqls#db-configuration"/>
|
||||||
|
for supported values.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home.packages = [ pkgs.sqls ];
|
||||||
|
|
||||||
|
xdg.configFile."sqls/config.yml" = mkIf (cfg.settings != { }) {
|
||||||
|
source = yamlFormat.generate "sqls-config" cfg.settings;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue