diff --git a/stylix/testbed/images.nix b/stylix/testbed/images.nix index 03e1aafc..1b5bde79 100644 --- a/stylix/testbed/images.nix +++ b/stylix/testbed/images.nix @@ -1,5 +1,6 @@ { fetchurl, + runCommandLocal, }: { dark = fetchurl { @@ -8,11 +9,22 @@ hash = "sha256-Dm/0nKiTFOzNtSiARnVg7zM0J1o+EuIdUQ3OAuasM58="; }; - light = fetchurl { - # Includes a space to make sure the path is properly quoted via - # `lib.escapeShellArg` when used as a shell argument. - name = "three bicycles.jpg"; - url = "https://unsplash.com/photos/hwLAI5lRhdM/download?ixid=M3wxMjA3fDB8MXxhbGx8fHx8fHx8fHwxNzE2MzYxNDcwfA&force=true"; - hash = "sha256-S0MumuBGJulUekoGI2oZfUa/50Jw0ZzkqDDu1nRkFUA="; - }; + light = + let + image = fetchurl { + name = "three-bicycles.jpg"; + url = "https://unsplash.com/photos/hwLAI5lRhdM/download?ixid=M3wxMjA3fDB8MXxhbGx8fHx8fHx8fHwxNzE2MzYxNDcwfA&force=true"; + hash = "sha256-S0MumuBGJulUekoGI2oZfUa/50Jw0ZzkqDDu1nRkFUA="; + }; + + # Create a path containing a space to test that `stylix.image` is + # correctly quoted when used as a shell argument. We have to use a + # directory as the parent because derivation names themselves cannot + # contain spaces. + directory = runCommandLocal "three-bicycles" { } '' + mkdir "$out" + cp ${image} "$out/three bicycles.jpg" + ''; + in + "${directory}/three bicycles.jpg"; } diff --git a/stylix/testbed/themes/schemeless.nix b/stylix/testbed/themes/schemeless.nix index f656f781..91c6789d 100644 --- a/stylix/testbed/themes/schemeless.nix +++ b/stylix/testbed/themes/schemeless.nix @@ -5,8 +5,8 @@ in { stylix = { enable = true; - image = images.dark; - polarity = "dark"; + image = images.light; + polarity = "light"; cursor = { name = "Vanilla-DMZ"; package = pkgs.vanilla-dmz;