fork/home-manager

git clone https://git.julia.blue/fork/home-manager

Robert Helgessontests: various minor cleanupseec22729

master
615 B25 linesraw
1{ config, ... }:
2
3let
4
5  filePath = ./. + "/source with spaces!";
6
7in {
8  home.file."oos".source = config.lib.file.mkOutOfStoreSymlink filePath;
9
10  nmt.script = ''
11    assertLinkExists "home-files/oos"
12
13    storePath="$(readlink $TESTED/home-files/oos)"
14
15    if [[ ! -L $storePath ]]; then
16      fail "Expected $storePath to be a symbolic link, but it was not."
17    fi
18
19    actual="$(readlink "$storePath")"
20    expected="${toString filePath}"
21    if [[ $actual != $expected ]]; then
22      fail "Symlink home-files/oos should point to $expected via the Nix store, but it actually points to $actual."
23    fi
24  '';
25}