diff --git a/devices/homie/modules/home-assistant/frontend.nix b/devices/homie/modules/home-assistant/frontend.nix index 0b428802..2b9a93f8 100644 --- a/devices/homie/modules/home-assistant/frontend.nix +++ b/devices/homie/modules/home-assistant/frontend.nix @@ -79,6 +79,13 @@ in { }; }; + customComponents = builtins.attrValues { + inherit + (self.legacyPackages.${pkgs.system}.hass-components) + material-symbols + ; + }; + customLovelaceModules = builtins.attrValues { inherit (pkgs.home-assistant-custom-lovelace-modules) @@ -87,7 +94,6 @@ in { inherit (self.legacyPackages.${pkgs.system}.lovelace-components) - material-symbols custom-sidebar ; }; diff --git a/flake.lock b/flake.lock index 7e941c05..98689a69 100644 Binary files a/flake.lock and b/flake.lock differ diff --git a/legacyPackages/hass-components/default.nix b/legacyPackages/hass-components/default.nix index a00307ca..0534f425 100644 --- a/legacyPackages/hass-components/default.nix +++ b/legacyPackages/hass-components/default.nix @@ -9,6 +9,7 @@ lib.makeScope pkgs.newScope (hass: let in { extended-ollama-conversation = buildHassComponent ./extended-ollama-conversation {}; ha-fallback-conversation = buildHassComponent ./ha-fallback-conversation {}; + material-symbols = buildHassComponent ./material-symbols {}; netdaemon = buildHassComponent ./netdaemon {}; spotifyplus = import ./spotifyplus ({inherit buildHassComponent;} // inputs); tuya-local = buildHassComponent ./tuya-local {}; diff --git a/legacyPackages/hass-components/material-symbols/default.nix b/legacyPackages/hass-components/material-symbols/default.nix new file mode 100644 index 00000000..907b5532 --- /dev/null +++ b/legacyPackages/hass-components/material-symbols/default.nix @@ -0,0 +1,15 @@ +{ + material-symbols-src, + buildHomeAssistantComponent, + ... +}: let + inherit (builtins) fromJSON readFile; + + manifest = fromJSON (readFile "${material-symbols-src}/custom_components/material_symbols/manifest.json"); +in + buildHomeAssistantComponent { + owner = "beecho01"; + + inherit (manifest) domain version; + src = material-symbols-src; + } diff --git a/legacyPackages/lovelace-components/default.nix b/legacyPackages/lovelace-components/default.nix index a99e2541..ca60ed98 100644 --- a/legacyPackages/lovelace-components/default.nix +++ b/legacyPackages/lovelace-components/default.nix @@ -7,5 +7,4 @@ lib.makeScope pkgs.newScope (lovelace: let callPackage = file: lovelace.callPackage file ({} // inputs); in { custom-sidebar = callPackage ./custom-sidebar; - material-symbols = callPackage ./material-symbols; }) diff --git a/legacyPackages/lovelace-components/material-symbols/default.nix b/legacyPackages/lovelace-components/material-symbols/default.nix deleted file mode 100644 index 0f769c2a..00000000 --- a/legacyPackages/lovelace-components/material-symbols/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ - material-symbols-src, - stdenv, - ... -}: -stdenv.mkDerivation { - pname = "material-symbols"; - version = "0.0.0+${material-symbols-src.shortRev}"; - src = material-symbols-src; - phases = ["installPhase"]; - installPhase = '' - mkdir $out - cp $src/dist/material-symbols.js $out - ''; -}