home-manager
home-manager copied to clipboard
bug: error evaluating accounts.email.accounts.<name>.aerc.smtpOauth2Params
Are you following the right branch?
- [X] My Nixpkgs and Home Manager versions are in sync
Is there an existing issue for this?
- [X] I have searched the existing issues
Issue description
I got
at /nix/store/69xnjv9zg8a0gsyhsn8lp8937wy0a392-source/modules/programs/aerc-accounts.nix:180:28:
179|
180| oauthParams' = oauthParams {
| ^
181| auth = cfg.aerc.smtpAuth;
… while calling 'oauthParams'
at /nix/store/69xnjv9zg8a0gsyhsn8lp8937wy0a392-source/modules/programs/aerc-accounts.nix:135:21:
134|
135| oauthParams = { auth, params }:
| ^
136| if useOauth auth && params != null && params != { } then
error: value is a function while a list was expected
and evaluating
https://github.com/nix-community/home-manager/blob/d57112db877f07387ce7104b5ac346ede556d2d7/modules/programs/aerc-accounts.nix#L135-L140
in nix-repl --expr 'import <nixpkgs> {}'
shows that
nix-repl> "?" + builtins.concatStringsSep "&" lib.attrsets.mapAttrsToList (k: v: k + "=" + lib.strings.escapeURL v) {"a" = "b"; "c" = "d";}
error:
… while calling the 'concatStringsSep' builtin
at «string»:1:7:
1| "?" + builtins.concatStringsSep "&" lib.attrsets.mapAttrsToList (k: v: k + "=" + lib.strings.escapeURL v) {"a" = "b"; "c" = "d";}
| ^
… while evaluating the second argument (the list of strings to concat) passed to builtins.concatStringsSep
at «none»:0: (source not available)
error: value is a function while a list was expected
while parenthesizing the second argument works:
nix-repl> "?" + builtins.concatStringsSep "&" (lib.attrsets.mapAttrsToList (k: v: k + "=" + lib.strings.escapeURL v) {"a" = "b"; "c" = "d";})
"?a=b&c=d"
Maintainer CC
@patwid
System information
- system: `"x86_64-linux"`
- host os: `Linux 6.6.35, NixOS, 24.05 (Uakari), 24.05.20240626.89c4987`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.18.2`
- nixpkgs: `/nix/store/f0ddmw6s86y567yg06h5019z72szbzch-source`