!QhvgabMQzwEQeWehhZ:lossy.network

NixOS Home Automation

505 Members
Declarative Home Automation and other Sidequests | https://wiki.nixos.org/wiki/Home_Assistant132 Servers

Load older messages


SenderMessageTime
29 Jan 2025
@laurynasp:matrix.orglaurynaspaha, yet another thing that I forgot to document in my setup - ta14:04:33
@nazarewk:matrix.orgkdnright... I forgot that I wanted to set up mac mini for that...14:15:08
@nazarewk:matrix.orgkdnwould cross-compilation from x86 to rpi4 be significantly longer (I've quite beefy desktop), do you have any materials on how to do that?14:16:07
@hexa:lossy.network@hexa:lossy.networkI haven't14:16:56
@laurynasp:matrix.orglaurynasp

Do you mean "x86_64-linux" or 32-bit system?

My main machine is "x86_64-linux", and on this machine I had add boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; to the config in order to be able to cross-compile for raspberry pi.

In terms of time, first time might take a while (depending on your config could be 10min or whatever), but redeploymetns usually take seconds to a minute, as long as changes don't require the whole univers to be rebuilt.

If it interests you, let me know, and I can share more details

15:15:06
@hexa:lossy.network@hexa:lossy.networkthat is not cross, that is emulation15:15:27
@laurynasp:matrix.orglaurynaspoh... okay15:15:42
@laurynasp:matrix.orglaurynaspwhats the difference?15:15:53
@hexa:lossy.network@hexa:lossy.networkemulation passes native instructions through qemu15:16:14
@hexa:lossy.network@hexa:lossy.networkcross instructs the compiler to compile for another target15:16:25
@hexa:lossy.network@hexa:lossy.networkhttps://wiki.nixos.org/wiki/Cross_Compiling15:16:39
@laurynasp:matrix.orglaurynaspI mean, ultimately that does create binaries locally, and once they are copied to pi, the pi can run15:16:43
@hexa:lossy.network@hexa:lossy.networksetting local and cross systems is the way for that15:16:52
@hexa:lossy.network@hexa:lossy.networkand it is much, much faster than emulation15:17:03
@laurynasp:matrix.orglaurynaspSo it means, that the end results (i.e. binaries) are the same, but the whole process is faster compared to emulation. Or does it mean that the actual binaries produces via emulation would run slower on pi, because those binaries are not as efficient?15:19:24
@mjm:midna.devmjmThe former15:20:01
@hexa:lossy.network@hexa:lossy.networkthey are not the same derivation, so you can't mix and match AIUI15:23:04
@hexa:lossy.network@hexa:lossy.networkbut the result of both are native to the target platform15:23:14
@laurynasp:matrix.orglaurynasp cool, I will put corss-compilation on my to do list, the faster and the cleaner the process, the better.
So far, though, the time that it takes to redeploy new system to pi using nixos-rebuild --target-host user@$NIXOS_INSTALL_TARGET_IP switch --flake .#ha-rpi --use-remote-sudo hasn't been a pain.
15:24:08
@robert:funklause.dedotlambda
In reply to @hexa:lossy.network
and it is much, much faster than emulation
I think that speed difference is negated by the fact that there aren't as many cross compiled packages in the cache
17:11:26
@robert:funklause.dedotlambda
In reply to @robert:funklause.de
I've decided against blueprints written in Nix for now: https://github.com/NixOS/nixpkgs/pull/377688
Should I rather turn this into a more generic option called e.g. extraConfigFiles that allows adding files anywhere below configDir?
17:12:44
30 Jan 2025
@kira:jakira.spaceKira joined the room.04:26:07
@k900:0upti.meK900OK what the hell15:28:03
@k900:0upti.meK900My thing is not detecting automations15:28:12
@k900:0upti.meK900Like, at all15:28:14
@k900:0upti.meK900I can make one through the UI, it shows up in annotations.yaml and then it's just not listed15:28:26
@k900:0upti.meK900* I can make one through the UI, it shows up in automations.yaml and then it's just not listed15:28:30
@hexa:lossy.network@hexa:lossy.networkmy dude15:29:05
@hexa:lossy.network@hexa:lossy.networkhttps://wiki.nixos.org/wiki/Home_Assistant#Automations,_Scenes,_and_Scripts_from_the_UI15:29:19
@hexa:lossy.network@hexa:lossy.networkcheck this link15:29:21

Show newer messages


Back to Room ListRoom Version: 6