Commit abd94905 authored by Jonathan Troyer's avatar Jonathan Troyer
Browse files

nixos/regreet: fix extraCss store paths written as literal text

lib.isPath only matches Nix path literals, not strings containing
store paths. When extraCss is set to a derivation's outPath (a string
like "/nix/store/..."), the condition falls through to the `text`
branch, writing the store path as literal CSS content instead of using
it as a file source.

Add lib.isStorePath to the condition so string store paths are
correctly handled via `source`.

Ref: https://github.com/nix-community/stylix/issues/2190
parent 637aa2f0
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -159,7 +159,10 @@ in

    environment.etc = {
      "greetd/regreet.css" =
        if lib.isPath cfg.extraCss then { source = cfg.extraCss; } else { text = cfg.extraCss; };
        if lib.isPath cfg.extraCss || lib.isStorePath cfg.extraCss then
          { source = cfg.extraCss; }
        else
          { text = cfg.extraCss; };

      "greetd/regreet.toml".source =
        if lib.isPath cfg.settings then