From c8f6322303486ab597be92f4b815969e1446438f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Thu, 29 Dec 2022 22:33:15 +0100 Subject: [PATCH] home-environment: use `lazyAttrsOf` for `home.sessionVariables` (#3541) * home-environment: use `lazyAttrsOf` for `home.sessionVariables` `attrs` has unreasonable merge semantics and is deprecated. `attrsOf` doesn't support variables depending on each other as is recommended in the option's description. * home-environment: restrict `sessionVariables` type The consumer is `toString`, but we don't want to accept e.g. lists. --- modules/home-environment.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home-environment.nix b/modules/home-environment.nix index bf83f0d28..098e10b21 100644 --- a/modules/home-environment.nix +++ b/modules/home-environment.nix @@ -256,7 +256,7 @@ in home.sessionVariables = mkOption { default = {}; - type = types.attrs; + type = with types; lazyAttrsOf (oneOf [ str path int float ]); example = { EDITOR = "emacs"; GS_OPTIONS = "-sPAPERSIZE=a4"; }; description = '' Environment variables to always set at login.