1 diff --git a/src/calamares/main.cpp b/src/calamares/main.cpp
2 index de709156f..a0b6c5faf 100644
3 --- a/src/calamares/main.cpp
4 +++ b/src/calamares/main.cpp
5 @@ -131,6 +132,8 @@ main( int argc, char* argv[] )
6 // TODO: umount anything in /tmp/calamares-... as an emergency save function
9 + CalamaresUtils::setNixosDirs();
11 bool is_debug = handle_args( a );
14 diff --git a/src/libcalamares/utils/Dirs.cpp b/src/libcalamares/utils/Dirs.cpp
15 index f333d6e64..6118fb412 100644
16 --- a/src/libcalamares/utils/Dirs.cpp
17 +++ b/src/libcalamares/utils/Dirs.cpp
18 @@ -115,6 +116,14 @@ setXdgDirs()
19 s_haveExtraDirs = !( s_extraConfigDirs.isEmpty() && s_extraDataDirs.isEmpty() );
25 + s_extraConfigDirs << "/run/current-system/sw/share/calamares/";
26 + s_extraDataDirs << "/run/current-system/sw/share/calamares/";
27 + s_haveExtraDirs = !( s_extraConfigDirs.isEmpty() && s_extraDataDirs.isEmpty() );
33 diff --git a/src/libcalamares/utils/Dirs.h b/src/libcalamares/utils/Dirs.h
34 index 445cbe1f1..da869d446 100644
35 --- a/src/libcalamares/utils/Dirs.h
36 +++ b/src/libcalamares/utils/Dirs.h
37 @@ -50,6 +50,9 @@ DLLEXPORT bool isAppDataDirOverridden();
38 /** @brief Setup extra config and data dirs from the XDG variables.
40 DLLEXPORT void setXdgDirs();
41 +/** @brief Setup extra config and data dirs fir NixOS.
43 +DLLEXPORT void setNixosDirs();
44 /** @brief Are any extra directories configured? */
45 DLLEXPORT bool haveExtraDirs();
46 /** @brief XDG_CONFIG_DIRS, each guaranteed to end with / */