6afb255d97
these changes were generated with nixq 0.0.2, by running nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix two mentions of the mdDoc function remain in nixos/, both of which are inside of comments. Since lib.mdDoc is already defined as just id, this commit is a no-op as far as Nix (and the built manual) is concerned.
38 lines
1,017 B
Nix
38 lines
1,017 B
Nix
{ config, lib, ... }:
|
|
|
|
with lib;
|
|
|
|
# unixODBC drivers (this solution is not perfect.. Because the user has to
|
|
# ask the admin to add a driver.. but it's simple and works
|
|
|
|
let
|
|
iniDescription = pkg: ''
|
|
[${pkg.fancyName}]
|
|
Description = ${pkg.meta.description}
|
|
Driver = ${pkg}/${pkg.driver}
|
|
'';
|
|
|
|
in {
|
|
###### interface
|
|
|
|
options = {
|
|
environment.unixODBCDrivers = mkOption {
|
|
type = types.listOf types.package;
|
|
default = [];
|
|
example = literalExpression "with pkgs.unixODBCDrivers; [ sqlite psql ]";
|
|
description = ''
|
|
Specifies Unix ODBC drivers to be registered in
|
|
{file}`/etc/odbcinst.ini`. You may also want to
|
|
add `pkgs.unixODBC` to the system path to get
|
|
a command line client to connect to ODBC databases.
|
|
'';
|
|
};
|
|
};
|
|
|
|
###### implementation
|
|
|
|
config = mkIf (config.environment.unixODBCDrivers != []) {
|
|
environment.etc."odbcinst.ini".text = concatMapStringsSep "\n" iniDescription config.environment.unixODBCDrivers;
|
|
};
|
|
|
|
}
|