nixos/home-automation: fix lovelace card entrypoint

Only append the .js extension to the card pname, not to the specified
entrypoint.
This commit is contained in:
Martin Weinelt 2023-12-06 04:29:27 +01:00
parent 80b0a35868
commit d809a6f9c3
No known key found for this signature in database
GPG key ID: 87C1E9888F856759

View file

@ -75,7 +75,7 @@ let
# Create parts of the lovelace config that reference lovelave modules as resources # Create parts of the lovelace config that reference lovelave modules as resources
customLovelaceModulesResources = { customLovelaceModulesResources = {
lovelace.resources = map (card: { lovelace.resources = map (card: {
url = "/local/nixos-lovelace-modules/${card.entrypoint or card.pname}.js?${card.version}"; url = "/local/nixos-lovelace-modules/${card.entrypoint or card.pname + ".js"}?${card.version}";
type = "module"; type = "module";
}) cfg.customLovelaceModules; }) cfg.customLovelaceModules;
}; };