1 # Global configuration for freetds environment.
3 { config, lib, pkgs, ... }:
9 cfg = config.environment.freetds;
17 environment.freetds = mkOption {
18 type = types.attrsOf types.str;
20 example = literalExpression ''
30 Configure freetds database entries. Each attribute denotes
31 a section within freetds.conf, and the value (a string) is the config
32 content for that section. When at least one entry is configured
33 the global environment variables FREETDSCONF, FREETDS and SYBASE
34 will be configured to allow the programs that use freetds to find the
44 config = mkIf (length (attrNames cfg) > 0) {
46 environment.variables.FREETDSCONF = "/etc/freetds.conf";
47 environment.variables.FREETDS = "/etc/freetds.conf";
48 environment.variables.SYBASE = "${pkgs.freetds}";
50 environment.etc."freetds.conf" = { text =
51 (concatStrings (mapAttrsToList (name: value: