diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-05-12 21:52:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-12 21:52:15 +0200 |
commit | 4433bbfd2a22dedc0372b3eb7d90b57631c9fbed (patch) | |
tree | ded93c6128f2e660be89f8fb5b7676a24144a6fd /nixos/modules/programs/freetds.nix | |
parent | 7047535b1cd4df09d5f3e93ff8e0e0133a1d7816 (diff) | |
parent | 49f6869f71fb2724674ccc18670bbde70843d43f (diff) |
Merge pull request #304773 from acid-bong/no-libs
treewide: remove file-wide `with lib;` uses in nixos/modules/programs
Diffstat (limited to 'nixos/modules/programs/freetds.nix')
-rw-r--r-- | nixos/modules/programs/freetds.nix | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/nixos/modules/programs/freetds.nix b/nixos/modules/programs/freetds.nix index 8b52fc37c5e03..77daaa8fd3985 100644 --- a/nixos/modules/programs/freetds.nix +++ b/nixos/modules/programs/freetds.nix @@ -2,8 +2,6 @@ { config, lib, pkgs, ... }: -with lib; - let cfg = config.environment.freetds; @@ -14,10 +12,10 @@ in options = { - environment.freetds = mkOption { - type = types.attrsOf types.str; + environment.freetds = lib.mkOption { + type = lib.types.attrsOf lib.types.str; default = {}; - example = literalExpression '' + example = lib.literalExpression '' { MYDATABASE = ''' host = 10.0.2.100 port = 1433 @@ -40,14 +38,14 @@ in ###### implementation - config = mkIf (length (attrNames cfg) > 0) { + config = lib.mkIf (builtins.length (builtins.attrNames cfg) > 0) { environment.variables.FREETDSCONF = "/etc/freetds.conf"; environment.variables.FREETDS = "/etc/freetds.conf"; environment.variables.SYBASE = "${pkgs.freetds}"; environment.etc."freetds.conf" = { text = - (concatStrings (mapAttrsToList (name: value: + (lib.concatStrings (lib.mapAttrsToList (name: value: '' [${name}] ${value} |