diff --git a/devenv/src/flake.tmpl.nix b/devenv/src/flake.tmpl.nix index b283b351b..c89d85365 100644 --- a/devenv/src/flake.tmpl.nix +++ b/devenv/src/flake.tmpl.nix @@ -63,12 +63,14 @@ devenv.cliVersion = version; devenv.root = devenv_root; devenv.dotfile = pkgs.lib.mkForce (devenv_root + "/" + devenv_dotfile_string); - devenv.tmpdir = tmpdir; } - (if container_name != null then { + (pkgs.lib.optionalAttrs (inputs.devenv.isTmpDir or false) { + devenv.tmpdir = tmpdir; + }) + (pkgs.lib.optionalAttrs (container_name != null) { container.isBuilding = pkgs.lib.mkForce true; containers.${container_name}.isBuilding = true; - } else { }) + }) ] ++ (map importModule (devenv.imports or [ ])) ++ [ ./devenv.nix (devenv.devenv or { }) diff --git a/flake.nix b/flake.nix index c35ed8d85..6ad6ee161 100644 --- a/flake.nix +++ b/flake.nix @@ -79,6 +79,7 @@ }); modules = ./src/modules; + hasTmpDir = true; templates = let diff --git a/src/modules/flake.nix b/src/modules/flake.nix index 8d889d665..eb76c1d5e 100644 --- a/src/modules/flake.nix +++ b/src/modules/flake.nix @@ -1,5 +1,6 @@ { outputs = { ... }: { modules = ./.; + hasTmpDir = true; }; }