mirror of
https://github.com/nickolaj-jepsen/nixos.git
synced 2026-01-22 08:06:50 +01:00
feat: add zwift integration to home-assistant
This commit is contained in:
parent
04c85ec904
commit
f1d4ea06fc
8 changed files with 47 additions and 13 deletions
|
|
@ -1,7 +1,7 @@
|
|||
_: {
|
||||
monitors = [
|
||||
{
|
||||
name = "DP-2";
|
||||
name = "DP-3";
|
||||
resolution = {
|
||||
width = 2560;
|
||||
height = 1440;
|
||||
|
|
@ -14,7 +14,7 @@ _: {
|
|||
};
|
||||
}
|
||||
{
|
||||
name = "DP-3";
|
||||
name = "DP-2";
|
||||
resolution = {
|
||||
width = 2560;
|
||||
height = 1440;
|
||||
|
|
|
|||
1
justfile
1
justfile
|
|
@ -39,6 +39,7 @@ switch hostname=`hostname -s` target='':
|
|||
else
|
||||
{{ nixcmd }} run nixpkgs#nixos-rebuild -- switch \
|
||||
--flake .#{{ hostname }} \
|
||||
--use-substitutes \
|
||||
--target-host {{ target }} \
|
||||
--sudo
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -79,6 +79,36 @@ in {
|
|||
hash = "sha256-W9xO3JjnRKHk/dlXMA6y5nEJl/KsGzPvJoumGw+nohw=";
|
||||
};
|
||||
})
|
||||
(pkgs.buildHomeAssistantComponent rec {
|
||||
owner = "snicker";
|
||||
domain = "zwift";
|
||||
version = "v3.3.5";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
inherit owner;
|
||||
repo = "zwift_hass";
|
||||
rev = version;
|
||||
hash = "sha256-+lJ6Otp8lT+xVtjiQLSQrqT5cVinRTRPTzS+HB1AxB0=";
|
||||
};
|
||||
propagatedBuildInputs = [
|
||||
(pkgs.python313.pkgs.buildPythonPackage rec {
|
||||
pname = "zwift-client";
|
||||
version = "0.2.0";
|
||||
pyproject = true;
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "nickolaj-jepsen";
|
||||
repo = "zwift-client";
|
||||
rev = "882fb881f1271dc104fd0250cab4ceb6e3710a59";
|
||||
hash = "sha256-4gOlWG+QVwODlIhiNH7rhiD0rzNv2WxY2ty9o/51eHU=";
|
||||
};
|
||||
doCheck = false;
|
||||
propagatedBuildInputs = with pkgs.python313.pkgs; [
|
||||
hatchling
|
||||
requests
|
||||
protobuf
|
||||
];
|
||||
})
|
||||
];
|
||||
})
|
||||
];
|
||||
extraComponents = [
|
||||
"default_config"
|
||||
|
|
@ -110,8 +140,14 @@ in {
|
|||
"127.0.0.1"
|
||||
"::1"
|
||||
];
|
||||
# base_url = "https://ha.nickolaj.com";
|
||||
};
|
||||
sensor = [
|
||||
{
|
||||
platform = "zwift";
|
||||
username = "!secret zwift_username";
|
||||
password = "!secret zwift_password";
|
||||
}
|
||||
];
|
||||
|
||||
automation = "!include automations.yaml";
|
||||
script = "!include scripts.yaml";
|
||||
|
|
|
|||
|
|
@ -108,4 +108,9 @@ in {
|
|||
cookie-domain = ".${rootDomain}";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.oauth2-proxy.serviceConfig = {
|
||||
Restart = "always";
|
||||
RestartSec = "5s";
|
||||
};
|
||||
})
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
}: {
|
||||
config = lib.mkIf config.fireproof.dev.enable {
|
||||
environment.systemPackages = with inputs.opencode.packages.${pkgs.stdenv.hostPlatform.system}; [
|
||||
opencode
|
||||
desktop
|
||||
# opencode
|
||||
# desktop
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,8 +0,0 @@
|
|||
age-encryption.org/v1
|
||||
-> ssh-ed25519 uxq+Zw reTHDLwj8jaI7giq5hw77+cvVurKP2vR8KeonjAJ+nY
|
||||
Pe6Df2WQawEnCp5GVCzegzEJaK868bhwZm2hEEwAc/I
|
||||
-> 6`Rk-grease K=O ttrh.^ [o4vdGR
|
||||
9xDUT+18cwMzzTgWlQzWBAniL9GAv+e4rmhwu3Vdwdh/mBeXJdfgEMxTqyRZk9TX
|
||||
BSW+CifV9iGZXmYm9b+NzKwWJUQ
|
||||
--- /NXPE/9QIghJoaXFNtmPMvs78dD2RdXbDWiBnwgXIzo
|
||||
£‹äÂe’Û•r³ü12„Gªˆ ¸[îsM[#¶Ô<C2B6>±ª,»ÁI<ö<>ÿ*~aýÎY³vYX½éŽOQÒøKÎ:°#g&:£õmÖHÀççK‹Ç·
žEZ·-þúpjËà˜Ý!¿]
|
||||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue