treewide: add missing package option
Provide more customization to the binary to be installed.
This commit is contained in:
parent
fcdd04e0f9
commit
107352dde4
27 changed files with 111 additions and 48 deletions
|
|
@ -9,6 +9,8 @@ in {
|
|||
options.programs.sqls = {
|
||||
enable = lib.mkEnableOption "sqls, a SQL language server written in Go";
|
||||
|
||||
package = lib.mkPackageOption pkgs "sqls" { nullable = true; };
|
||||
|
||||
settings = lib.mkOption {
|
||||
type = yamlFormat.type;
|
||||
default = { };
|
||||
|
|
@ -33,7 +35,7 @@ in {
|
|||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [ pkgs.sqls ];
|
||||
home.packages = lib.mkIf (cfg.package != null) [ cfg.package ];
|
||||
|
||||
xdg.configFile."sqls/config.yml" = lib.mkIf (cfg.settings != { }) {
|
||||
source = yamlFormat.generate "sqls-config" cfg.settings;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue