2021-09-13 04:44:58 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
config = {
|
|
|
|
xdg.configHome = /. + "${config.home.homeDirectory}/.dummy-config";
|
|
|
|
xdg.dataHome = /. + "${config.home.homeDirectory}/.dummy-data";
|
|
|
|
xdg.cacheHome = /. + "${config.home.homeDirectory}/.dummy-cache";
|
2021-11-04 17:42:44 +01:00
|
|
|
xdg.stateHome = /. + "${config.home.homeDirectory}/.dummy-state";
|
2021-09-13 04:44:58 +02:00
|
|
|
|
|
|
|
xdg.configFile.test.text = "config";
|
|
|
|
xdg.dataFile.test.text = "data";
|
|
|
|
home.file."${config.xdg.cacheHome}/test".text = "cache";
|
2021-11-04 17:42:44 +01:00
|
|
|
home.file."${config.xdg.stateHome}/test".text = "state";
|
2021-09-13 04:44:58 +02:00
|
|
|
|
|
|
|
nmt.script = ''
|
|
|
|
assertFileExists home-files/.dummy-config/test
|
|
|
|
assertFileExists home-files/.dummy-cache/test
|
|
|
|
assertFileExists home-files/.dummy-data/test
|
2021-11-04 17:42:44 +01:00
|
|
|
assertFileExists home-files/.dummy-state/test
|
2021-09-13 04:44:58 +02:00
|
|
|
assertFileContent \
|
|
|
|
home-files/.dummy-config/test \
|
|
|
|
${builtins.toFile "test" "config"}
|
|
|
|
assertFileContent \
|
|
|
|
home-files/.dummy-data/test \
|
|
|
|
${builtins.toFile "test" "data"}
|
|
|
|
assertFileContent \
|
|
|
|
home-files/.dummy-cache/test \
|
|
|
|
${builtins.toFile "test" "cache"}
|
2021-11-04 17:42:44 +01:00
|
|
|
assertFileContent \
|
|
|
|
home-files/.dummy-state/test \
|
|
|
|
${builtins.toFile "test" "state"}
|
2021-09-13 04:44:58 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|