72904c318c
GitOrigin-RevId: 9bf1f40af124573a54fd208b1f539eb694ef31a6
29 lines
675 B
Nix
29 lines
675 B
Nix
{ config, lib, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
filePath = ./. + "/source with spaces!";
|
|
|
|
in {
|
|
config = {
|
|
home.file."oos".source = config.lib.file.mkOutOfStoreSymlink filePath;
|
|
|
|
nmt.script = ''
|
|
assertLinkExists "home-files/oos"
|
|
|
|
storePath="$(readlink $TESTED/home-files/oos)"
|
|
|
|
if [[ ! -L $storePath ]]; then
|
|
fail "Expected $storePath to be a symbolic link, but it was not."
|
|
fi
|
|
|
|
actual="$(readlink "$storePath")"
|
|
expected="${toString filePath}"
|
|
if [[ $actual != $expected ]]; then
|
|
fail "Symlink home-files/oos should point to $expected via the Nix store, but it actually points to $actual."
|
|
fi
|
|
'';
|
|
};
|
|
}
|