parent
4cd0058a01
commit
e47f6ea0d7
10 changed files with 183 additions and 18 deletions
devices/homie/modules/home-assistant
flake.lockflake.nixinputs.nixlegacyPackages
|
@ -2,8 +2,8 @@
|
||||||
caule-themes-src,
|
caule-themes-src,
|
||||||
dracul-ha-src,
|
dracul-ha-src,
|
||||||
material-rounded-theme-src,
|
material-rounded-theme-src,
|
||||||
material-symbols-src,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
|
self,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (pkgs.writers) writeYAML;
|
inherit (pkgs.writers) writeYAML;
|
||||||
|
@ -13,6 +13,70 @@ in {
|
||||||
"themes/caule.yaml".source = "${caule-themes-src}/themes/caule-themes-pack-1.yaml";
|
"themes/caule.yaml".source = "${caule-themes-src}/themes/caule-themes-pack-1.yaml";
|
||||||
"themes/dracul-ha.yaml".source = "${dracul-ha-src}/themes/dracul-ha.yaml";
|
"themes/dracul-ha.yaml".source = "${dracul-ha-src}/themes/dracul-ha.yaml";
|
||||||
"themes/material_rounded.yaml".source = "${material-rounded-theme-src}/themes/material_rounded.yaml";
|
"themes/material_rounded.yaml".source = "${material-rounded-theme-src}/themes/material_rounded.yaml";
|
||||||
|
|
||||||
|
"www/sidebar-config.yaml".source = writeYAML "sidebar" {
|
||||||
|
id = "my-sidebar";
|
||||||
|
|
||||||
|
order = [
|
||||||
|
# Top
|
||||||
|
{
|
||||||
|
item = "overview";
|
||||||
|
order = 1;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
match = "href";
|
||||||
|
item = "calendar";
|
||||||
|
order = 2;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
match = "href";
|
||||||
|
item = "todo";
|
||||||
|
order = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Bottom
|
||||||
|
{
|
||||||
|
bottom = true;
|
||||||
|
item = "esphome";
|
||||||
|
order = 5;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
bottom = true;
|
||||||
|
item = "logbook";
|
||||||
|
order = 7;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
bottom = true;
|
||||||
|
icon = "mdi:tools";
|
||||||
|
item = "developer tools";
|
||||||
|
name = "Developer tools";
|
||||||
|
order = 9;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
bottom = true;
|
||||||
|
item = "settings";
|
||||||
|
order = 11;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Hidden
|
||||||
|
{
|
||||||
|
hide = true;
|
||||||
|
item = "map";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
hide = true;
|
||||||
|
item = "energy";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
hide = true;
|
||||||
|
item = "history";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
hide = true;
|
||||||
|
item = "media";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
customLovelaceModules = builtins.attrValues {
|
customLovelaceModules = builtins.attrValues {
|
||||||
|
@ -21,21 +85,19 @@ in {
|
||||||
card-mod
|
card-mod
|
||||||
;
|
;
|
||||||
|
|
||||||
material-symbols = pkgs.stdenv.mkDerivation {
|
inherit
|
||||||
pname = "material-symbols";
|
(self.legacyPackages.${pkgs.system}.lovelace-components)
|
||||||
version = "0.0.0+${material-symbols-src.shortRev}";
|
material-symbols
|
||||||
src = material-symbols-src;
|
custom-sidebar
|
||||||
phases = ["installPhase"];
|
;
|
||||||
installPhase = ''
|
|
||||||
mkdir $out
|
|
||||||
cp $src/dist/material-symbols.js $out
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config.frontend = {
|
config.frontend = {
|
||||||
themes = "!include_dir_merge_named themes";
|
themes = "!include_dir_merge_named themes";
|
||||||
extra_module_url = ["/local/nixos-lovelace-modules/card-mod.js"];
|
extra_module_url = map (p: "/local/nixos-lovelace-modules/${p}.js") [
|
||||||
|
"card-mod"
|
||||||
|
"custom-sidebar-yaml"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
config.template = [
|
config.template = [
|
||||||
|
|
17
flake.lock
generated
17
flake.lock
generated
|
@ -204,6 +204,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"custom-sidebar-src": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1729030143,
|
||||||
|
"narHash": "sha256-dSNgEMgfXm2z5WFYeoZsak9XCI0YEwUmMPA96hJ8O1k=",
|
||||||
|
"owner": "elchininet",
|
||||||
|
"repo": "custom-sidebar",
|
||||||
|
"rev": "fcada915b5bbece5f9b75924a806ff0e3f3544e8",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "elchininet",
|
||||||
|
"repo": "custom-sidebar",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"discord-overlay": {
|
"discord-overlay": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"Vencord-src": "Vencord-src",
|
"Vencord-src": "Vencord-src",
|
||||||
|
@ -1640,6 +1656,7 @@
|
||||||
"bazarr-bulk": "bazarr-bulk",
|
"bazarr-bulk": "bazarr-bulk",
|
||||||
"caddy-plugins": "caddy-plugins",
|
"caddy-plugins": "caddy-plugins",
|
||||||
"caule-themes-src": "caule-themes-src",
|
"caule-themes-src": "caule-themes-src",
|
||||||
|
"custom-sidebar-src": "custom-sidebar-src",
|
||||||
"discord-overlay": "discord-overlay",
|
"discord-overlay": "discord-overlay",
|
||||||
"dracul-ha-src": "dracul-ha-src",
|
"dracul-ha-src": "dracul-ha-src",
|
||||||
"dracula-plymouth-src": "dracula-plymouth-src",
|
"dracula-plymouth-src": "dracula-plymouth-src",
|
||||||
|
|
|
@ -50,6 +50,12 @@
|
||||||
repo = "caule-themes-pack-1";
|
repo = "caule-themes-pack-1";
|
||||||
type = "github";
|
type = "github";
|
||||||
};
|
};
|
||||||
|
custom-sidebar-src = {
|
||||||
|
flake = false;
|
||||||
|
owner = "elchininet";
|
||||||
|
repo = "custom-sidebar";
|
||||||
|
type = "github";
|
||||||
|
};
|
||||||
discord-overlay = {
|
discord-overlay = {
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
owner = "matt1432";
|
owner = "matt1432";
|
||||||
|
|
13
inputs.nix
13
inputs.nix
|
@ -180,12 +180,12 @@ let
|
||||||
|
|
||||||
srcs = [
|
srcs = [
|
||||||
# Home-assistant
|
# Home-assistant
|
||||||
|
## Components
|
||||||
{
|
{
|
||||||
name = "extended-ollama-conversation-src";
|
name = "extended-ollama-conversation-src";
|
||||||
owner = "TheNimaj";
|
owner = "TheNimaj";
|
||||||
repo = "extended_ollama_conversation";
|
repo = "extended_ollama_conversation";
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
owner = "m50";
|
owner = "m50";
|
||||||
repo = "ha-fallback-conversation";
|
repo = "ha-fallback-conversation";
|
||||||
|
@ -199,6 +199,7 @@ let
|
||||||
owner = "net-daemon";
|
owner = "net-daemon";
|
||||||
repo = "integration";
|
repo = "integration";
|
||||||
}
|
}
|
||||||
|
### SpotifyPlus
|
||||||
{
|
{
|
||||||
name = "spotifyplus-src";
|
name = "spotifyplus-src";
|
||||||
owner = "thlucas1";
|
owner = "thlucas1";
|
||||||
|
@ -214,12 +215,16 @@ let
|
||||||
owner = "thlucas1";
|
owner = "thlucas1";
|
||||||
repo = "SpotifyWebApiPython";
|
repo = "SpotifyWebApiPython";
|
||||||
}
|
}
|
||||||
|
###
|
||||||
|
|
||||||
|
## Voice
|
||||||
{
|
{
|
||||||
name = "wakewords-src";
|
name = "wakewords-src";
|
||||||
owner = "fwartner";
|
owner = "fwartner";
|
||||||
repo = "home-assistant-wakewords-collection";
|
repo = "home-assistant-wakewords-collection";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
## Themes
|
||||||
{
|
{
|
||||||
owner = "berti24";
|
owner = "berti24";
|
||||||
repo = "dracul-ha";
|
repo = "dracul-ha";
|
||||||
|
@ -233,10 +238,16 @@ let
|
||||||
owner = "Nerwyn";
|
owner = "Nerwyn";
|
||||||
repo = "material-rounded-theme";
|
repo = "material-rounded-theme";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
## Lovelace Components
|
||||||
{
|
{
|
||||||
owner = "beecho01";
|
owner = "beecho01";
|
||||||
repo = "material-symbols";
|
repo = "material-symbols";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
owner = "elchininet";
|
||||||
|
repo = "custom-sidebar";
|
||||||
|
}
|
||||||
|
|
||||||
# Nvim plugins
|
# Nvim plugins
|
||||||
{
|
{
|
||||||
|
|
|
@ -11,7 +11,8 @@
|
||||||
(pkgs.callPackage file ({inherit mkVersion;} // inputs));
|
(pkgs.callPackage file ({inherit mkVersion;} // inputs));
|
||||||
in {
|
in {
|
||||||
dracula = mkScope ./dracula;
|
dracula = mkScope ./dracula;
|
||||||
hass-components = mkScope ./hass-components;
|
|
||||||
firefoxAddons = mkScope ./firefox-addons;
|
firefoxAddons = mkScope ./firefox-addons;
|
||||||
|
hass-components = mkScope ./hass-components;
|
||||||
|
lovelace-components = mkScope ./lovelace-components;
|
||||||
mpvScripts = mkScope ./mpv-scripts;
|
mpvScripts = mkScope ./mpv-scripts;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
{pkgs, ...} @ inputs:
|
{
|
||||||
pkgs.lib.makeScope pkgs.newScope (drac: {
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
} @ inputs:
|
||||||
|
lib.makeScope pkgs.newScope (drac: {
|
||||||
bat = drac.callPackage ./bat.nix {
|
bat = drac.callPackage ./bat.nix {
|
||||||
inherit (inputs) bat-theme-src mkVersion;
|
inherit (inputs) bat-theme-src mkVersion;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
{pkgs, ...} @ inputs:
|
{
|
||||||
pkgs.lib.makeScope pkgs.newScope (hass: let
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
} @ inputs:
|
||||||
|
lib.makeScope pkgs.newScope (hass: let
|
||||||
buildHassComponent = file: extraArgs:
|
buildHassComponent = file: extraArgs:
|
||||||
hass.callPackage file (inputs // extraArgs // {});
|
hass.callPackage file (inputs // extraArgs // {});
|
||||||
in {
|
in {
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
{
|
||||||
|
custom-sidebar-src,
|
||||||
|
nodejs,
|
||||||
|
pnpm,
|
||||||
|
stdenv,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
package = builtins.fromJSON (builtins.readFile "${custom-sidebar-src}/package.json");
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
|
pname = "custom-sidebar";
|
||||||
|
inherit (package) version;
|
||||||
|
|
||||||
|
src = custom-sidebar-src;
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
nodejs
|
||||||
|
pnpm.configHook
|
||||||
|
];
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
npm run build
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir $out
|
||||||
|
cp ./dist/* $out
|
||||||
|
'';
|
||||||
|
|
||||||
|
pnpmDeps = pnpm.fetchDeps {
|
||||||
|
inherit (finalAttrs) pname version src;
|
||||||
|
hash = "sha256-oERAaN/0uyImDRlxJIdKutFh3jYFJQh2KAeM1LXBpjU=";
|
||||||
|
};
|
||||||
|
})
|
11
legacyPackages/lovelace-components/default.nix
Normal file
11
legacyPackages/lovelace-components/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
} @ inputs:
|
||||||
|
lib.makeScope pkgs.newScope (lovelace: let
|
||||||
|
callPackage = file: lovelace.callPackage file ({} // inputs);
|
||||||
|
in {
|
||||||
|
custom-sidebar = callPackage ./custom-sidebar;
|
||||||
|
material-symbols = callPackage ./material-symbols;
|
||||||
|
})
|
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
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
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue