mirror of
https://github.com/nix-community/home-manager
synced 2024-08-24 21:16:31 +02:00
The previous implementation would allow variables to sneak into the file names. This commit makes sure the resulting target file path exactly matches the expected path.
16 lines
299 B
Nix
16 lines
299 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
config = {
|
|
home.file."$HOME/$FOO/bar baz".text = "blah";
|
|
|
|
nmt.script = ''
|
|
assertFileExists 'home-files/$HOME/$FOO/bar baz';
|
|
assertFileContent 'home-files/$HOME/$FOO/bar baz' \
|
|
${pkgs.writeText "expected" "blah"}
|
|
'';
|
|
};
|
|
}
|