diff --git a/modules/home/direnv/default.nix b/modules/home/direnv/default.nix index 4f1f4b6..67beb62 100644 --- a/modules/home/direnv/default.nix +++ b/modules/home/direnv/default.nix @@ -7,8 +7,8 @@ in enable = my.mkDisableOption "direnv configuration"; defaultFlake = mkOption { - type = types.str; - default = "nixpkgs"; + type = with types; nullOr str; + default = null; example = "pkgs"; description = '' Which flake from the registry should be used for @@ -39,7 +39,7 @@ in in lib.my.genAttrs' files linkLibFile; - home.sessionVariables = { + home.sessionVariables = lib.mkIf (cfg.defaultFlake != null) { DIRENV_DEFAULT_FLAKE = cfg.defaultFlake; }; };