diff --git a/modules/home/direnv/default.nix b/modules/home/direnv/default.nix index 4f1f4b6..c3ed3f2 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 @@ -40,7 +40,7 @@ in lib.my.genAttrs' files linkLibFile; home.sessionVariables = { - DIRENV_DEFAULT_FLAKE = cfg.defaultFlake; + DIRENV_DEFAULT_FLAKE = lib.mkIf (cfg.defaultFlake != null) cfg.defaultFlake; }; }; }