diff --git a/globals.nix b/globals.nix index fe8896f..b3329e4 100644 --- a/globals.nix +++ b/globals.nix @@ -84,6 +84,10 @@ in cidrv6 = "fd30::/64"; hosts.ward.id = 1; hosts.sausebiene.id = 5; + hosts.philips-ac2889 = { + id = 21; + mac = globals.macs.scanner-ads-4300n; + }; hosts.bambulab-p1s = { id = 22; mac = globals.macs.bambulab-p1s; diff --git a/hosts/sausebiene/hass-lovelace/config-template-card/package.nix b/hosts/sausebiene/hass-lovelace/config-template-card/package.nix new file mode 100644 index 0000000..e082f79 --- /dev/null +++ b/hosts/sausebiene/hass-lovelace/config-template-card/package.nix @@ -0,0 +1,48 @@ +{ + lib, + stdenvNoCC, + fetchFromGitHub, + fetchYarnDeps, + yarnConfigHook, + yarnBuildHook, + nodejs, +}: +stdenvNoCC.mkDerivation rec { + pname = "config-template-card"; + version = "1.3.6-unstable"; + + src = fetchFromGitHub { + owner = "oddlama"; + repo = "config-template-card"; + rev = "517159d1d0aed3d9b7664e832d20a184c52e6e2f"; + hash = "sha256-U+yHjhrFw+6DtADIy7kkAGu3hXdxbgH0kG8Ay6cCAWI="; + }; + + offlineCache = fetchYarnDeps { + inherit src; + hash = "sha256-H5vADyspiGSWxBISXWiXvehqFItYDI0PEou42LdqEJU="; + }; + + nativeBuildInputs = [ + yarnConfigHook + yarnBuildHook + nodejs + ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out + cp dist/* $out + + runHook postInstall + ''; + + meta = { + description = "Templatable Lovelace Configurations"; + homepage = "https://github.com/oddlama/config-template-card"; + license = lib.licenses.mit; + platforms = lib.platforms.all; + maintainers = with lib.maintainers; [ oddlama ]; + }; +} diff --git a/hosts/sausebiene/hass-lovelace/hui-element/package.nix b/hosts/sausebiene/hass-lovelace/hui-element/package.nix new file mode 100644 index 0000000..3805be5 --- /dev/null +++ b/hosts/sausebiene/hass-lovelace/hui-element/package.nix @@ -0,0 +1,55 @@ +{ + lib, + stdenvNoCC, + fetchFromGitHub, + fetchNpmDeps, + npmHooks, + nodejs, +}: +stdenvNoCC.mkDerivation rec { + pname = "hui-element"; + version = "unstable-2025-01-28"; + + src = fetchFromGitHub { + owner = "oddlama"; + repo = "lovelace-hui-element"; + rev = "4569a5bf0069de0467c1bf73f0d5cfcff039bc26"; + hash = "sha256-qTGbisJ+AHamzMyn38w8URbO/mQM0cOP4Vwss770/eE="; + }; + + npmDeps = fetchNpmDeps { + inherit src; + hash = "sha256-TiLDwE6JtY+EYe/CjYTo0ZjBtpif19CNggcLpqbkVMo="; + }; + + nativeBuildInputs = [ + npmHooks.npmConfigHook + nodejs + ]; + + buildPhase = '' + runHook preBuild + + rm hui-element.js + npm run build + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out + cp hui-element.js $out/ + + runHook postInstall + ''; + + meta = { + description = "Use built-in elements in the wrong place"; + homepage = "https://github.com/thomasloven/lovelace-hui-element"; + license = lib.licenses.mit; + platforms = lib.platforms.all; + maintainers = with lib.maintainers; [ oddlama ]; + }; +} diff --git a/hosts/sausebiene/home-assistant.nix b/hosts/sausebiene/home-assistant.nix index f86fa05..72e8b42 100644 --- a/hosts/sausebiene/home-assistant.nix +++ b/hosts/sausebiene/home-assistant.nix @@ -61,10 +61,17 @@ in hash = "sha256-jQXQdcgW8IDmjaHjmeyXHcNTXYmknNDw7Flegy6wj2A="; }; })) + dwd + waste_collection_schedule ]; customLovelaceModules = with pkgs.home-assistant-custom-lovelace-modules; [ - (pkgs.callPackage ./hass-lovelace/clock-weather-card/package.nix { }) + (builtins.trace "soon upstreamed" ( + pkgs.callPackage ./hass-lovelace/clock-weather-card/package.nix { } + )) + (pkgs.callPackage ./hass-lovelace/config-template-card/package.nix { }) + (pkgs.callPackage ./hass-lovelace/hui-element/package.nix { }) + apexcharts-card bubble-card button-card card-mod @@ -121,14 +128,15 @@ in extraPackages = python3Packages: with python3Packages; [ - psycopg2 - gtts - fritzconnection adguardhome - zlib-ng - pymodbus - pyipp + dwdwfsapi + fritzconnection + gtts + psycopg2 pyatv + pyipp + pymodbus + zlib-ng ]; }; diff --git a/hosts/sentinel/plausible.nix b/hosts/sentinel/plausible.nix index 5b2a768..3dd0a1e 100644 --- a/hosts/sentinel/plausible.nix +++ b/hosts/sentinel/plausible.nix @@ -14,12 +14,6 @@ in group = "plausible"; }; - age.secrets.plausible-admin-pw = { - generator.script = "alnum"; - mode = "440"; - group = "plausible"; - }; - environment.persistence."/persist".directories = [ { directory = "/var/lib/clickhouse"; @@ -52,13 +46,6 @@ in disableRegistration = true; secretKeybaseFile = config.age.secrets.plausible-secret.path; }; - - adminUser = { - activate = true; - name = "admin"; - email = "plausible@${globals.domains.me}"; - passwordFile = config.age.secrets.plausible-admin-pw.path; - }; }; services.nginx = { diff --git a/secrets/global.nix.age b/secrets/global.nix.age index e5af071..a2c404b 100644 Binary files a/secrets/global.nix.age and b/secrets/global.nix.age differ