nixos-configs/devices/homie/modules/home-assistant/default.nix

119 lines
2.4 KiB
Nix
Raw Normal View History

chore: update flake.lock Flake Inputs: • Updated input 'agsV2': 'github:Aylur/ags/1341310' (2024-09-30) → 'github:Aylur/ags/35e40fd' (2024-10-09) • Updated input 'astal': 'github:Aylur/astal/2a3bb3a' (2024-10-07) → 'github:Aylur/astal/921272a' (2024-10-10) • Updated input 'gpu-screen-recorder-src': 'git+https://repo.dec05eba.com/gpu-screen-recorder?ref=refs/heads/master&rev=0a8d176' (2024-10-07) → 'git+https://repo.dec05eba.com/gpu-screen-recorder?ref=refs/heads/master&rev=935a7b8' (2024-10-09) • Updated input 'home-manager': 'github:nix-community/home-manager/0386303' (2024-10-07) → 'github:nix-community/home-manager/d47d332' (2024-10-10) • Updated input 'hyprgrass': 'github:horriblename/hyprgrass/427690a' (2024-08-25) → 'github:horriblename/hyprgrass/1535962' (2024-10-09) • Updated input 'hyprland': 'github:hyprwm/Hyprland/613eac4' (2024-10-08) → 'github:hyprwm/Hyprland/b65773b' (2024-10-10) • Updated input 'material-rounded-theme-src': 'github:Nerwyn/material-rounded-theme/d78298f' (2024-09-17) → 'github:Nerwyn/material-rounded-theme/40f93bd' (2024-10-10) • Updated input 'nix-gaming': 'github:fufexan/nix-gaming/d5e4fb8' (2024-10-08) → 'github:fufexan/nix-gaming/86a897d' (2024-10-10) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/c31898a' (2024-10-06) → 'github:NixOS/nixpkgs/5633bcf' (2024-10-09) • Updated input 'nixpkgs-wayland': 'github:nix-community/nixpkgs-wayland/0a5e8f7' (2024-10-08) → 'github:nix-community/nixpkgs-wayland/2a1ef3c' (2024-10-10) • Updated input 'piper-src': 'github:libratbag/piper/0f72869' (2024-09-24) → 'github:libratbag/piper/c6e54f6' (2024-10-09) • Updated input 'spotifywebapi-src': 'github:thlucas1/SpotifyWebApiPython/c1e2f4b' (2024-10-05) → 'github:thlucas1/SpotifyWebApiPython/e885769' (2024-10-10) • Updated input 'tuya-local-src': 'github:make-all/tuya-local/df26ea0' (2024-10-08) → 'github:make-all/tuya-local/20c1224' (2024-10-10) Docker Images: • hrfee/jfa-go unstable: sha256:958d926bd245b6a6a11155f02f04b3d3e05130cc1da98290a68fa5d911fe2f0f → sha256:f78c5b727b6c94942803f6a3bc47aa60fe197b97417d869448aa6e7fd4bba55c • vegardit/gitea-act-runner dind-latest: sha256:5686ce9464839df7333098a61a802d16645d92fa4175b02684a536656d17a28f → sha256:06ab3f910c5015792942d8c338fd865d3dff1163cea2e8c3efd32330c7775802 • rssbridge/rss-bridge latest: sha256:fada58f35c97d4e50ae045176339722b69397a6803a46c00799a96160db84092 → sha256:c4fd6ad6e395310cc5d49665bfca638d09ba6cf9d03ad60a5c36361cb7c05251 • ghcr.io/linuxserver/bazarr latest: sha256:137f55b12859e7f6905c513d403ba80dfe3b2afe7fa892c891c1982996a114ba → sha256:d7d431c29d1c94e7009b6b8b1eb5078689416278b5e6664cad864b28b9ead345 • 21hsmw/flaresolverr nodriver: sha256:14447de91cff69e78059864e6540d42a5b94a8ec1b1856485cd015afbab91b9c → sha256:a85e675e7b4e980e142d58e440dd3e1b6fa6bc10aabcc612727f81e34c28db80 • ghcr.io/linuxserver/sabnzbd latest: sha256:a33738b946bee3bd2a754b2e576643d069ac2913d88290ef13d8e00f0c0e1224 → sha256:f87f9d4fa0e19f8e7b292638b3fa89cafc4a96d858fbda8106e3cea6343432c1 Firefox Addons: floccus: 5.3.0.2 -> 5.3.1 sponsorblock: 5.9.3 -> 5.9.4 Misc Sources: Vuetorrent: 2.14.0 -> 2.14.1
2024-10-10 14:59:38 -04:00
{
pkgs,
self,
...
}: {
imports = [
./assist.nix
./bluetooth.nix
./firmware.nix
./frontend.nix
2024-10-05 12:38:13 -04:00
./netdaemon
./spotify
./timer
self.nixosModules.ha-plus
];
services.home-assistant = {
enable = true;
extraComponents = [
2024-10-23 00:30:24 -04:00
"androidtv"
"androidtv_remote"
"caldav"
"cast"
"holiday"
"isal"
"met"
2024-09-19 22:16:11 -04:00
"switchbot"
"upnp"
"yamaha_musiccast"
];
2024-10-23 00:30:24 -04:00
customComponents = builtins.attrValues {
inherit
(self.scopedPackages.${pkgs.system}.hass-components)
2024-10-23 00:30:24 -04:00
yamaha-soundbar
;
};
config = {
2024-09-06 10:14:03 -04:00
homeassistant = {
name = "Home";
unit_system = "metric";
currency = "CAD";
country = "CA";
time_zone = "America/Montreal";
external_url = "https://homie.nelim.org";
};
2024-10-23 00:30:24 -04:00
media_player = [
{
platform = "yamaha_soundbar";
host = "192.168.0.96";
name = "Living Room Speaker";
sources = {
HDMI = "TV";
};
}
];
# Proxy settings
http = {
server_host = "0.0.0.0";
trusted_proxies = ["100.64.0.8" "100.64.0.9"];
use_x_forwarded_for = true;
};
# `default_config` enables too much stuff. this is what I want from it
config = {};
dhcp = {};
history = {};
image_upload = {};
logbook = {};
mobile_app = {};
my = {};
sun = {};
zeroconf = {};
};
};
2024-10-06 22:16:59 -04:00
environment.systemPackages = [
(pkgs.writeShellApplication {
name = "yaml2nix";
runtimeInputs = with pkgs; [yj];
text = ''
input="$(yj < "$1")"
output="''${2:-""}"
nixCode="$(nix eval --expr "builtins.fromJSON '''$input'''" --impure | alejandra -q | sed 's/ = null;/ = {};/g')"
if [[ "$output" != "" ]]; then
echo "$nixCode" > "$output"
else
echo "$nixCode"
fi
'';
})
(pkgs.writeShellApplication {
name = "nix2yaml";
runtimeInputs = with pkgs; [remarshal];
text = ''
input="$1"
output="''${2:-""}"
yamlCode="$(nix eval --json --file "$input" | remarshal --if json --of yaml)"
if [[ "$output" != "" ]]; then
echo "$yamlCode" > "$output"
else
echo "$yamlCode"
fi
'';
})
];
}